Question Drop Down Box writes incorrect value to table

Paul_birm

Registered User.
Local time
Today, 22:28
Joined
Jul 15, 2008
Messages
30
Hi.

I have a series of 3 drop down boxes on a form. each drop down has text data in such as tom, dick, harry etc.

when you select, say 'tom' - the data table, when viewed after, is holding the value of the item on the list - ie 1 in the case of 'tom' or 2 inthe case of 'dick' - INSTEAD i NEED the data file to hold the ACTUAL data chosen, NOT the value of it on the drop down list.

what am i doing wrong here and how can i fix it. thanks in advance:)
 
Don't to use a LOOKUP properties in the table.
 
this is the code that runs when a button is pressed on the form.

Set dbCurrent = CurrentDb()
Set rs = CurrentDb.OpenRecordset("TBL_SubmissionData", dbOpenDynaset)

With rs
.AddNew
!Project = Me![Combo7]
!Valve = Me![Combo9]
!Title = Me![Text13]
!FieldText = Me![Text11]
!Approved = "No"

.Update


:mad:
 
Without knowing your database, its hard to say what exactly your code is doing. Each combo box has a "Bound Column" property. This is the column in the combo box that is saved to the table.

So if you have a table like:
Code:
EmployeeID     FirstName     LastName
1                   Tom            Jones
2                   Dick            Smith
3                   Harry          Carpenter

And you have a combobox with a bound column of 1, then when you select Dick Smith from the combobox as a new entry, its going to write 2 to the table (its saving EmployeeID to the table).
 
thats it !!!

i was confusing myself as i was using 1 table for the source data for all three drop downs

i have now copied the table and made 2 further tables

the combo drop down boxes now reference the individual table relative to the combo box, NOT the same data table

i have amended the BOUND property to the appropriate column number ( 2 in this case, as col 1 has the ID no on it) and all seems to be hunky dorey now.

thanks all for the help and advice... i will be back

:):):)
 

Users who are viewing this thread

Back
Top Bottom