Combo Box

JohnGio56

Registered User.
Local time
Yesterday, 21:47
Joined
Feb 12, 2010
Messages
23
Hey guys! So I'm trying to figure out how to populate 2 fields in a form from one combo box. Is that possible? Thanks in advance!!:)
 
It is possible. What you need to do is make sure that the information you wish to show in the text boxes, is part of the data being selected by the combo box.

Then in you text boxes put the following as the control source;
Code:
=ComboName.Column([B]X[/B])
Where X is the number of the column that holds the data you wish to display in the text box.
Remember; the columns in a combo are Zero indexed, i.e. the first column is column zero the next column one and so one.
 
Thank you! I will try that and let you know how it turns out.
 
Okay that didn't work... I get ?Name# in the field and nothing shows up. For example I have a combo box with shows multiple clients and their account number along with their purchase num and when I select them from the box to update info i want to update both fields in the form at once. Any ideas?
 
Have you changed ComboName of =ComboName.Column(X) to the name of your Combo?
 
Okay so i get this error message "Main Menu can't find the macro' End Sub.' " But after I click okay it does update the field!!!! AHHHHH sooooo close!!!! Any ideas?
 
OKay so I got it to auto fill but now I get an error message that states

The field 'Client_Survey.Client_rec_Num ' cannot contain a Nulll value because the required property for this field is set to True. Enter a value in this field.

Any ideas? I mean the number shows up in the field bu apparently the db isn't reading it? Am I correct?
 
Can I message it to you for confidentiality reasons?
 
Just make a copy of your DB, and replace any sensitive data with anonymous data.
 
k i removed the data but for some reason it wont post? Is it bc its pass protected?
 
Have you done a compact and repair on it? Then zip it and post the zip file.
 
Straight up; Consider implementing a naming protocol for your DB Objects, for example FRM_FormName, TBL_TableName, QRY_QueryName, RPT_ReportName etc. avoid using spaces and other special characters as these will cause you no end of grief down the track. Limit yourself to alpha and numeric characters and under score (_).

Just make a copy of your DB, and replace any sensitive data with anonymous data.

You will also need to put some dummy data in your DB and let me know which form it is that you are currently struggling with.
 
I'm sorry about that I can barely keep my eyes open. :) I did implement your ideas into the final copy but I don't have time to do it in the dummy. It does make sense to establish those protocols bc I'm sure it makes queries easier down the road so thanks for your help! This is my first database I've ever built and it's nice to have someone guiding me bc my boss is too busy. I attached the dummy db with a couple records in it. What I would like to do it have the exit or entry surveys have the ability to not only auto pop pat_id but also med_rec_num from the combo box that way the users don't have to manually enter it as they go. Thanks again!!!!!!
 

Attachments

Please make sure the DB at least works before you post it.

You have deleted the switch board and a number of other forms that still have code associated with them. I not sure if this is causing problems but I have been unable to save design changes to forms without the DB crashing.

You also seem to have a normalisation issue.
 

Users who are viewing this thread

Back
Top Bottom