Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Malfunctioning combo boxes

Status
Not open for further replies.

TooGoon

Technical User
Jul 8, 2003
29
US
'sup

I have a form which has three combo boxes behaving rather mysteriously.
The form calls qCourses, which has the fields: instructor, type, and Origin. Each of the fields is a numeric reference to a corresponding record in the tables tblInstructor, tblType, and tblOrigin.
The combo boxes are bound to these fields. And they pull their data from the referenced tables. Their format is such that they reference two columns, the id (autonumber column), and the label field. The first field is the bound column, the column count 2, and the column widths 0",1". Everything normal and standard.

Now it should follow that by selecting the textual record displayed in the combo box would enter the numeric id value into the bound field. Right?
Wrong.
I recieve this error message: "The value you entered isn't valid for this field" or, somehow the combo box actually changes the values of the combo box's record source to a numeric value.

Access2003, WindowXP

Thanks
 
Column numbering starts at 0

Hope this helps
Hymn
 
That didn't turn out to be the problem, but thanks anyway hymn.

I had a relationship in the query which was binding the .Origin field to its corresponding table. So everytime i tried to insert the numeric value of the combo box into the field, I was actually trying to overwrite the value in the Origin table.

:p
 
How are ya TooGoon . . . . .

Hmmmmmm . . . . interesting . . . . .
[blue]The form calls qCourses, which has the fields: [purple]instructor[/purple], [purple]type[/purple], and [purple]Origin[/purple]. Each of the fields is a numeric reference to a corresponding record in the tables tblInstructor, tblType, and tblOrigin.
T[purple]he combo boxes are bound to these fields[/purple]. And they pull their data from the referenced tables. Their format is such that they reference two columns, [purple]the id (autonumber column)[/purple], and the label field. [purple]The first field is the bound column[/purple],[/blue]
First you say the combo's are bound to the fields [purple]instructor[/purple], [purple]type[/purple], and [purple]Origin[/purple]. Then you say [purple]the bound column properties are set to theID's![/purple] If this is true then your trying to put the Id's (autonumber) in the fields you've quoted, and as an result data typing appears to be raising the error.

In other words the Control Source for each combo is set to the respective field, but the bound column of the combo is set to the ID!

[blue]Shouldn't the combo's be bound to Column 1?[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top