Wednesday 6 July 2016

Solution to Error: Auto-populating text from multiple drop down boxes to start creating information in a new column

Auto-populating text from multiple drop down boxes to start creating information in a new column

I am relatively new to Access 2007 and have been looking for information on this for several hours this morning.
I hope someone can send me in the right direction.

We have LocationID and ComponentType columns that are the first and second part of a UniqueComponentID (three-part number) column that we need.
Format would be xxxxx-xxxxx-xxx.
First set of Xs would be the info in LocationID.
Second set would be info in
ComponentType.
Then third would be unique numbers entered in by the data entry person.
Ideally, we would like the LocationID to be selected in a drop down box in its column, supplied by its connection to a Location table.
Same for the ComponentType.
Then have
the text from those two different drop down choices auto-populate the first two parts of the text in the UniqueComponentID column.
When the data entry person finishes the UniqueComponentID, we want that saved to a new table as the key for the new table.
The
goal is to save entry time, as well as prevent the data entry errors that happen from typing out the first two portions of the UniqueComponentID by hand.

Is it possible to automate this? What would the code look like?

Anwsers to the Problem Auto-populating text from multiple drop down boxes to start creating information in a new column

Download Error Fixer for Free Now

That's exactly right.

To relate this table to the WorkAssignments table you have two choices:

1.  You can include three identically named columns in the WorkAssignments table as a composite foreign key.  These three in combination with another column or columns in the WorkAssignments table would be its composite primary key.  This is a more relationally
pure solution, but you now have a key of four columns, so things begin to get a little cumbersome.  Not so cumbersome as you might think, however, because the usual way you'd assign multiple work assignments to each row in the 'items' table would be by means
of a subform within an 'items' form.  By setting the LinkMasterFields and LinkChildFields properties of the subform control to the three columns, separating them with semi-colons, i.e.

LocationID;ComponmentType;TheThirdColumn

the correct values are automatically inserted into the three foreign key columns in the WokAssignments table.

Nevertheless, you might want to consider option 2 below.

2.  In this case you'd give the 'items' table an autonumber primary key, ItemID.  The combination of LocationID, ComponmentType and TheThirdColumn is still a 'candidate key', however, so you now need to include all three columns in a unique index.  This is
done in table design view from Indexes on the Design ribbon.  In the dialogue which opens enter a suitable name for the index in the first empty row of the Index name column, ItemIndex say.  In the Field Name column of the same row enter LocationID, and with
this row still selected, in the Index Properties below, select 'Yes' as the Unique property.  Then enter ComponentType in the Field Name column in the row immediately beneath LocationID.  Don't enter anything in the Index name column for this row.  Then enter
the real name of TheThirdColumn in the Field Name column in the row immediately beneath ComponentType .  Again don't enter anything in the Index name column for this row.  Close the dialogue and save the table design.  Indexing candidate keys uniquely is imperative
to the protection of data integrity, but is nevertheless not infrequently omitted in my experience.

In the WorkAssignments table you'd now give it a WorkAssignmentID autonumber primary key, and a foreign key ItemID column, the latter of long integer number data type.

With option 1 you'd be using 'natural' keys, with option 2 'surrogate keys'.  Both will work perfectly well, but if you use natural keys you should enforce cascade updates as well as referential integrity when relating the tables.  With surrogate keys this
is not necessary as you cannot edit the value of an autonumber.

With natural keys you can compute the unique identifier in a single computed column or control solely from this table as it contains all four columns.  With surrogate keys you need to join the tables in a query to return the values from each to be able to concatenate
them into a single identifier in a report for instance.  This is not a problem, however, and is a perfectly routine way of doing things.

When you have multi-column candidate keys like this most people would probably opt to use surrogate keys, and in this case I'd be inclined to do so.  I've even seen occasional posts by respondents who've said that surrogate keys must be used, which is certainly
not the case, but they can make things a little more convenient.  Sometimes they have disadvantages, however.  When correlating two or more combo boxes in a continuous form so that the selection in one restricts the available values in another, natural keys
work far better and obviate the need to use kludgy 'hybrid' controls.

Windows Error Reporting - To Fix Auto-populating text from multiple drop down boxes to start creating information in a new column

  1. Go to Start button.
  2. Open Control Panel.
  3. Go to Windows Error Reporting.
  4. Click on System and Maintenance, then click Problem Reports and Solutions.
  5. Next, click Change Settings located on the left side panel of the Problem Reports and Solutions window.
  6. Select an option to configure how you want Windows to look for a solution to your problems. You may allow Windows to do it automatically or ask you every time to check if problem occurs.
  7. Next, click the Advanced settings link.
  8. Select Off to turn off Error Reporting.

Another Safe way to Fix the Problem: Auto-populating text from multiple drop down boxes to start creating information in a new column:

How to Fix Auto-populating text from multiple drop down boxes to start creating information in a new column with SmartPCFixer?

1. Click the button to download SmartPCFixer . Install it on your system.  Run it, and it will scan your system. The junk files will be shown in the list.

2. After the scan is finished, you can see the errors and problems which need to be fixed.

3. The Repair part is finished, the speed of your computer will be much higher than before and the errors have been removed. You can also use other functions in SmartPCFixer. Like dll downloading, windows updating and print spooler error repair.


Related: AMD Radeon HD 7800M Win8 not working [Anwsered],I can access the internet, get on facebook and get to hotmail, but I can't play games on facebook and I can't open or respond to my e-mails,I keep getting this Media Player error when I log on my computer. [Anwsered],[Anwsered] System Hanging on shutdown and restart,Unable to get the Vlookup property of the WorksheetFunction class,Solution to Error: Error: "0x81000032 make sure the C: drive is online and set to NTFS" when trying to backup to external hard drive.
,Troubleshoot:External Hard Drive not listed in Windows 7 backup wizard Error
,I'm always being signed off so annoying Tech Support
,Solution to Problem: Impossible to use Internet Explorer! I keep getting the same error message every time i try to use IE.
,Solution to Problem: Referencing data in another file
,Troubleshoot:Error: "0x81000032 make sure the C: drive is online and set to NTFS" when trying to backup to external hard drive. Error,External Hard Drive not listed in Windows 7 backup wizard Tech Support,Tech Support: I'm always being signed off so annoying,Solution to Problem: Impossible to use Internet Explorer! I keep getting the same error message every time i try to use IE.,Referencing data in Access using Excel [Anwsered],Need Best Way To Present Data [Anwsered],Same question but for windows 7 home edition,sometimes fullscreen won't activate [Solved],Solution to Error: We bought a new computer with windows 7 and it is constantly freezing. How do we fix this?,Solution to Error: Windows 8 update crash (2013-07-22)
Read More: Fast Solution to Error: Back up - lock screen,[Solved] Awaking from Hibernate without prompting while motherboard appears to be asleep.,Tech Support: Autofilter and conditional formatting,Troubleshoot:AutoComplete: iexplore.exe - Application Error,How to Fix Problem - Auto row height adjustment on merged cells?,application not found error,any problems in a team where one has Windows XP and the other has Windows 7?,Application/Object-Defined Error,An Excel formula question where hours are totalled and cumulating,Anyone know the hardware email?

No comments:

Post a Comment