Add New Record Using Combo Box

I am using 2 different tables: Employee Info and Trip Details. I need to have a blank form open to enter new information, but I would like a combo box to choose the employees name, as there are over 300 employees. Ideally, the first name, last name, and DOB would be populated, but the rest of the information would still be blank to add new data. I could then just hit a button to open the form again to add information about a different employee. I am having a problem doing this and would greatly appreciate if someone could let me know how to accomplish this. Thanks.
0
Utf
3/22/2007 12:26:03 AM
access 16762 articles. 3 followers. Follow

5 Replies
1297 Views

Similar Articles

[PageSpeed] 57

On Wed, 21 Mar 2007 17:26:03 -0700, Marie <Marie@discussions.microsoft.com>wrote:>I am using 2 different tables: Employee Info and Trip Details. I need to have >a blank form open to enter new information, but I would like a combo box to >choose the employees name, as there are over 300 employees. Ideally, the >first name, last name, and DOB would be populated, but the rest of the >information would still be blank to add new data. I could then just hit a >button to open the form again to add information about a different employee. >I am having a problem doing this and would greatly appreciate if someone >could let me know how to accomplish this. Thanks.STOP.You're misunderstanding how relational databases work!A table of Employee Info should have last name, first name, etc.That information should NOT be stored redundantly in the Trip Details table -only the  unique EmployeeID should.Typically one would use a Form based on Employee Info, and a Subform based onTrip Details, with (just!) trip information entered on the subform. TheEmployeeID would be the master link field/child link field of the subform.Check out some of the suggestions at:Jeff Conrad's resources page:http://www.accessmvp.com/JConrad/accessjunkie/resources.htmlThe Access Web resources page:http://www.mvps.org/access/resources/index.html             John W. Vinson [MVP]
0
John
3/22/2007 1:35:12 AM
In the Trip Details table, I added the SSN as a foreign key, I didn't add any other employee data. The primary key in that table is Trip ID. I linked SSN from employee info table to the SSN in Trip Details table for a one to many relationship. I want to have the main form to hold the employee information, and the subform for the trip information. However, I want the user to be able to click a button in the main switchboard to open the form in add new record view, so when the form opens, it will be completely blank. Then, I want to have a combo box which has all the employees names listed, and when the user clicks on the name they want, the rest of the employee fields will be populated, but the subform will still be blank so that the user can add all the new trip information about the employee they picked."John W. Vinson" wrote:> On Wed, 21 Mar 2007 17:26:03 -0700, Marie <Marie@discussions.microsoft.com>> wrote:> > >I am using 2 different tables: Employee Info and Trip Details. I need to have > >a blank form open to enter new information, but I would like a combo box to > >choose the employees name, as there are over 300 employees. Ideally, the > >first name, last name, and DOB would be populated, but the rest of the > >information would still be blank to add new data. I could then just hit a > >button to open the form again to add information about a different employee. > >I am having a problem doing this and would greatly appreciate if someone > >could let me know how to accomplish this. Thanks.> > STOP.> > You're misunderstanding how relational databases work!> > A table of Employee Info should have last name, first name, etc.> > That information should NOT be stored redundantly in the Trip Details table -> only the  unique EmployeeID should.> > Typically one would use a Form based on Employee Info, and a Subform based on> Trip Details, with (just!) trip information entered on the subform. The> EmployeeID would be the master link field/child link field of the subform.> > Check out some of the suggestions at:> > Jeff Conrad's resources page:> http://www.accessmvp.com/JConrad/accessjunkie/resources.html> > The Access Web resources page:> http://www.mvps.org/access/resources/index.html> >              John W. Vinson [MVP]> 
0
Utf
3/22/2007 2:28:10 AM
On Wed, 21 Mar 2007 19:28:10 -0700, Marie <Marie@discussions.microsoft.com>wrote:>I want the user to be able >to click a button in the main switchboard to open the form in add new record >view, so when the form opens, it will be completely blank. Then, I want to >have a combo box which has all the employees names listed, and when the user >clicks on the name they want, the rest of the employee fields will be >populated, but the subform will still be blank so that the user can add all >the new trip information about the employee they picked.Use the Form toolbox Combo Box wizard to create an unbound combo box on themain form - "Use this combo to find a record". You don't want or need tocreate a new employee record, just navigate to the existing one.What exactly are the trip details? Are there multiple records of details abouteach trip? If so you need a Trips table: one employee --- many trips, eachtrip --- many details. You may need a sub-subform.             John W. Vinson [MVP]
0
John
3/22/2007 3:33:34 AM
On Thu, 22 Mar 2007 06:58:18 -0700, Marie <Marie@discussions.microsoft.com>wrote:>These are bus drivers for people with disabilities. There is 1 bus driver per >trip and many details for the trip, bus#, route#, number of passengers, is >there an aide, odometer reading before and after, etc. It's really pretty >simple. Like you said, the bus drivers are already in their own table, so a >new driver will not be added, just a new trip for each driver. But because >there are so many drivers, I would like a drop down box for the user to >select the driver's name and just add all the trip details. Thanks again.This should be pretty simple then. Simply base a Form on the trip table; usethe Combo Box Wizard to create a combo box bound to the driverID, based on thetable of drivers. The combo can *display* the driver's name while storingtheir ID; the user doesn't need to even see the ID.             John W. Vinson [MVP]
0
John
3/22/2007 3:08:03 PM
Thank you so much. I will try that and let you know how I make out."John W. Vinson" wrote:> On Thu, 22 Mar 2007 06:58:18 -0700, Marie <Marie@discussions.microsoft.com>> wrote:> > >These are bus drivers for people with disabilities. There is 1 bus driver per > >trip and many details for the trip, bus#, route#, number of passengers, is > >there an aide, odometer reading before and after, etc. It's really pretty > >simple. Like you said, the bus drivers are already in their own table, so a > >new driver will not be added, just a new trip for each driver. But because > >there are so many drivers, I would like a drop down box for the user to > >select the driver's name and just add all the trip details. Thanks again.> > This should be pretty simple then. Simply base a Form on the trip table; use> the Combo Box Wizard to create a combo box bound to the driverID, based on the> table of drivers. The combo can *display* the driver's name while storing> their ID; the user doesn't need to even see the ID.> > >              John W. Vinson [MVP]> 
0
Utf
3/23/2007 1:44:13 AM
Reply:

Similar Artilces:

Combobox Help needed
Hello, I have been trying to populate a Combobox with a filter set to what is being typed in the combo's edit control. If I type in "C" it selects the first 40 "C" then I would like to type in "u" clear the listbox portion and put in the first 40 "Cu" etc.. I would need to clear only the combo's edit box but unfortunately ResetContent()also clears the edit box. It gets the first 40 "C" but then the edit box is cleared. I have also tried using DeleteString. void CCustView::OnEditupdateCombo1() { UpdateData(); if (i>0) { m_CbCust....

Tick boxs on a packing list
I am creating a report that shows products along with a subform showing optional extras for each product. On the subform i have drawn a box so it gives me the options when printed and packing the order to tick them off as boxed. This work fine when i have optional extra but when i have no optional extras in the subform i just end up with a box on the screen which i do not want. How do i set it up so it does not have box when i have no optinal extra So long as there is nothing else in that same horizontal space, you can turn on the CanShrink property and it will disappear when empty. HTH --...

Inventory Transactions using Integration Manager
Hi I am trying to import inventory transactions (adjustmnet) using the IM, the key thing is I want all lines in a single transaction. I memic the sample in IM. but its not working imports all linesbut I am getting this error: Object 'Adjustment 1' already exists -- cannot Insert. I think the problem is related to te documnet number, I am using a cloumn that conatains the same number for all rows (in order to import all the lines in a single trx) Am I missing anything? any hint? Thanks Look at the "group by" function in the IM manual. An import will consist of hea...

XP Style button using MFC 4.2
Hi, I am using Visual C++ 6, MFC 4.2. Windows XP SP2. My problem is, how could I get the XP Style buttons on the dialog. If i dynamically create the button using CreateWindow() the button still looks same. I've tried 'Button Controls' article on MSDN but no luck. Could anyone help me? Thanks, Fahad Themes are handled by the system, and not on a button-basis. The way to give your application running on XP the themed look is to include a manifest resource. The resource can either be a resource compiled into your EXE or it can be a separate file in the same directory as your ...

Error 80070057
H I just installed a Exchange 2003 box as new server of a Exchange 5.5 site (exdeploy-tools) I didn't received any errors during install and mail flow between servers My issue is when I view the RUS properties it shows only Descriptio properties and when I try to generate a new RUS service I get the erro Exchange System Manager Invalid Argumen Facility: Win3 ID No: 8007005 Exchange System Manage I received the same error message when I try to generate a new Address Lis What is the problem The exchange service account is member of the following groups: local administrators, domain a...

new emails don't show without clicking send-receive
new emails don't show without clicking send-receive button--and now I've lost the send/receive button. What do I do? thanks ...

Limit record count in query
Hello all, I have a query that will return over 65K records (rows). My end goal is to export this to Excel via code. Excel has a limit of 65K rows on a single tab. So, 65K to tab1, the rest of the records to tab2. I figured I would have query1 that would limit the results to 65K, and query2 that would start at 65K +1 to the end. How can I limit query1 to 65K and query2 to start at 65K +1? I'm not sure how efficient this will be but you could try: SELECT TOP 65000 * FROM [query that will return over 65K records] ORDER BY PrimaryKeyField; and SELECT * FROM [query that will retu...

How to concatenate multiple values in text box
I'm trying to code a control source for a text box to concatenate and handle various possible values. There are three fields I need to handle: For example, if the values for the three fields are ... Person_Relation = "Parent" Person_Relation_Other = <NULL> Person_Relation_Type = "Biological" .... my text box should show: Parent :Biological; (The ":" and ";" will be replaced by "(" and ")" but for now it's easier to use something other than parentheses for testing.) If instead the values for the three fields are...

Using VBA to change Excel layouts
Our company has designed 4 different spreadsheet designs. The same data gets stored in any of the 4 spreadsheet layouts....the only difference is that some spreadsheets use different colors, have different fonts and cell sizes and etc... I thought it would be nice to create just ONE spreadsheet that contains a combo-box or list-box or drop-down box which allows the user to select 1 of the 4 layout choices, then I want VBA to programattically setup the spreadsheet layout according to the users choice. Does that make sense? Does anybody know any good ways to implement something lik...

USING DATES IN FORMULAS #2
I foubd a problem with excel 2003 If you introduce a formula using dates (in spanish version) (dd/mm/yy), excel doesnt makes the calculation........... ???? Can somebody hep me In the USA version (English), I could use: =if(a1=date(2005,10,27),"It's Oct 27, 2005","it's not") to refer to a date. I don't know what the Spanish function is for =date(), though. Carlos Benavides wrote: > > I foubd a problem with excel 2003 > If you introduce a formula using dates (in spanish version) (dd/mm/yy), > excel doesnt makes the calculation........... ????...

How do I use a pivot table to get an average count? #2
I have a list of transactions with colum headers of Month, Date, Weekday, Time and the transaction data. I would like to see the average number of transaction per hour per day. Can this be done in a pivot table? ...

Adding a new company to exsiting Exchange Server
I have an exsiting domain and our company just purchased another company and we are moving them to our location and we want to add their users to our exchange server. I have went to the website msexchange.org and followed the Shared hosting with exchange part 1. 1 I dont have ADSI Edit tool and we planned on them joining our domain, is this going to be a probblem? 2. When adding users to the new OU it defaults to our domain email and not the new company email what did I miss? Thank you for your time on this manner. On Wed, 27 Jul 2005 12:19:04 -0700, LaOVis <LaOVis@discussions.micro...

When collecting data by using e-mail messages
I'm getting the Warning message - these email messages might contain data that is of a confidential or sensitive nature - and it's not giving me access to the Create button in the wizard. The suggestion is to remove any fields in my message that might contain the confidential data, but there are none. How do I get around this? -- boniG When I said "there are none", I meant that none of the fields contain data of a sensitive or confidential nature. I even tried removing every field except the very first one which is simply a text field with the identificat...

continually getting send/receive errors using outlook 2002
Does anyone know why I am continually getting send/receive errors when trying to send an e-mail. I can receive e-mails from virtually anybody that is not blocked by Norton Anti-Spam(Norton Internet Security 2005). My account is a pop3 account with the 'Orange' mobile phone network, therefore it has an '@orange.net' address. I have tried 'repairing' outlook from add/remove programs - this did not fix the problem. Neither did uninstalling and re-installing (also from add/remove programs) this time it only allowed me to send a test e-mail to my '@aol.com' ad...

OE mail template "new" and "replay" modify
hi I am not sure this is the proper group for outlook express, but anyway: is it possible to modify the templates of an e-mail message "new" and "reply" - i need to have the field "Bcc" (hidden copy) filled with a default e-mail address string - in Outlook Express -- best regards, mac maziek wrote: > hi > > I am not sure this is the proper group for outlook express, but anyway: > > is it possible to modify the templates of an e-mail message "new" and > "reply" - i need to have the field "Bcc" (hidden copy) ...

Combo Box, list order
I am using a Combo Box to select and display names from a table. The names in the table are in alphabetic order and to begin with so was the Combo Box. I have since added new names to the list, the Table list remains in alphabetic order but the Combo Box is all over the place. Can anyone suggest a cure for this. Many Thanks Fritz Open the form in design view. Right-click the combo, and choose Properties. On the Data tab, examine the Row Source property. Make it a query that sorts the records the way you want. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access u...

How can I use wildcards in IF statements and Macros
I want to include in a Macro, something to take a particular action if the active cell contains text beginning with X. I thought something based on an IF statement, that included a wildcard, might work, e.g. IF(A1="X*,1,0). This does not work though. Sub JustDoIt() Dim s As String s = ActiveCell.Value If Left(x, 1) = "X" Then MsgBox "We should do something" End If End Sub -- Gary''s Student - gsnu200909 "AlanF" wrote: > I want to include in a Macro, something to take a particular action if the > active cell conta...

Sharepoint list using using Issue "Created at" in calculations
We are using SharePoint at work. I currently have a list that I use the following Calculation to indicate how long an event have been open. =DATEDIF(Date,"1/4/2010","d"), however I would like to key on the Item “Created at” that is stored for each item. Does anyone know how to pint to that within a calculation. The result would be it has been 15 days since a list item was opened. ...

Can I start a macro using a # key?
Hi all can anyone help me with starting a macro called "gsw" by using the # or | or ~ key? The reason being I am trying to activate this macro by barcode scan and I cannot print a barcode using ctrl + X TIA Check out the OnKey method in help. Sub DoKeyAssign() Application.OnKey "#", "gsw" End Sub Sub gsw() MsgBox "Hello!" End Sub -- Jim Rech Excel MVP ...

Repeat formula in new rows
I have created a simple spread sheet to keep track of finances. Each day I want to enter a stock price at the beginning of a new row and then have about 8 columns adjust their amounts in the new row. When I enter a new stock price at the beginning of a new line and press enter, only two of the 8 columns tabulate and produce new amounts. The two columns that do act correctly have these formulas on line 14 for example: F14 has: =50000*B14 J14 has: =F14-187492.97 Some of the ones that do not adjust and stay blank have these formulas on line 13: C13 has: =B13-B12 but there is nothing i...

Access 2003
My question is in 2 parts and concerns a new business contacts database and the questions are: - Question 1 I want to be able to attach Word documenst (letters) and pdf's to each contact so I have a full archive history showing my activity against each contact i.e. when I access each contact a would like to have a full archive of all of the contact I have had with each contact and be able to see the letters I've drafted and sent. Question 2 I want to give this new contact list to my team and assign them each a unique tag so I can tell who has last accessed the record. Am no...

CRM add in
Does anyone know of a simple CRM like add-in for RMS that would allow the user to track more custom information on their customers. It doesn't need to be anything quite as robust as a standalone CRM application would be, just a little more flexible than the 15 fields RMS offers. Custom screen pulled from a custom POS button. Maybe use Access? Just some ideas. I don't know of a specific add on. If you are interested in our helping you do this, contact me anytime. -- Amy Luby, President Microsoft Certified Business Solutions Partner Mobitech Omaha, NE 68137 402-330-0707(o) 40...

Some Public Folder mails not visible using IMAP
Windows 2000 SP4 server/Exchange 2003 SP Strange thing happened yesterday. In the the course of 2 minutes about 200 mails appeared in one of our Public Folders, mails which had been received earlier into one of the other Public folders. All the mails have correct sender/receiver/subject but have blank messages. The receiving dates have been changed to yesterday's date, but looking at the details in Outlook these mails were all first received on Jan 6, 2006. Even stranger is that when viewed using IMAP these mails are not visible, but using OWA or Outlook in Corporate mode, they are visib...

Alternate row color for combo box
Please advice how to make the alternate row color of a combo box. I mean one row white the next yellow, next row white, next row yellow color and so on. I am using Access 2000 Regards Irshad On Fri, 14 May 2010 22:44:01 -0700, Irshad Alam <IrshadAlam@discussions.microsoft.com> wrote: There is no built-in way to do this. If you feel strongly about this, let Microsoft know and submit a feature request. -Tom. Microsoft Access MVP >Please advice how to make the alternate row color of a combo box. I mean one >row white the next yellow, next row white, next ...

Combo Boxes #4
Can someone please tell me how I lock a combo box to a cell? Right-click on the control and click Format control, then select tab Properties. HTH, Nikos "RF" <anonymous@discussions.microsoft.com> wrote in message news:9ca301c3eac7$6e665ea0$a401280a@phx.gbl... > Can someone please tell me how I lock a combo box to a > cell? ...