How do I fill in other cells??

trackmedic

Registered User.
Local time
Today, 12:42
Joined
Aug 20, 2001
Messages
115
Ok, here is another one to pick your brain. I have a form that has a combo box that looks up cargo stored in a cargo table. I have also made this combo box able to have information entered into it freehand. When I choose an item in the cargo table through this combo box, I want the serial number of that item carried over to the ser# column in my table. On the form, I have brought the text box ser# into view. I have put this command into it =[cargo discription].[column](2). On the for the serial number is visible but it does not carry into my table. Any help would be greatly appreciated.
 
try =[cargo discription].[column](1)

The first column in the combo box starts at 0
 
Tried That!!

Thanks for the reply. I have the syntax right. Where I'm running into the problem is that the choice is showing up on my form but not transferring to my table.


Thanks
 
On the AfterUpdate event of the combo box try:

Me.fieldname =Me.[cargo discription].[column](2)

Obviously, change "fieldname" to the actual name of the field that the serial number appears in. Watch out, however that you aren't storing information in a table unnecessarily. You would normally store the unique ID field for the item selected in the combo box, the bound field. Although you could view both the cargo description and serial number on the form, you would only need to store the cargo id field to the table to create the link.
 

Users who are viewing this thread

Back
Top Bottom