Greetings!
Still the same application (as previous posts). I worked on the app
while at work (don't tell my boss ... cause this is just for fun and not
work related) and the form was working, but now when I try to repeat the
code at home (for real) it won't work. I suspect that I haven't
replicated the logic and forms at home from what I remember that I did
while at work.
My subform is based on a table called "tblTrialClass" and it has a bound
control called [classID]. [classID] is a FK from "tblClasses". The
values are 1, 2, 3 representing the text "Novice", "Open", "Utility".
The [classID] control's VISIBLE property is set to False.
The subform, also, has an unbound combobox called [cboClass]. The
recordsource is:
SELECT tblClasses.classID, tblClasses.class
FROM tblClasses
ORDER BY tblClasses.classID;
First column has a width of 0", so the dropdown only shows the text.
Bound column is the first column (classID).
The table called "tblClasses" has two columns: classID (autonumber, key)
and class (text).
The subform has the following VBA code behind it:
Private Sub cboClass_AfterUpdate()
Me![classID] = Me!cboClass.Column(0)
End Sub
Private Sub cboJudge_AfterUpdate()
Me![judgeID] = Me!cboJudge.Column(0)
End Sub
Private Sub Form_Current()
Me![cboClass] = Me![classID]
Me![cboJudge] = Me![judgeID]
End Sub
(I haven't mentioned the Judge fields, but they have the same problem)
When the form is opened, whether dynamically by the outter parent form,
or manually by me when testing the subform; [cboClass] has "Novice"
displaying for all records, even though the value of [classID] is not
always = 1. I tested this out by making the [classID] visible to verify
the data.
QUESTION:
How do I synchronize the combobox data with the bound integer field
[classID]?
I am pulling my hair out on this one. It's so simple, I'm sure.
Thanks,
SueB
*** Sent via Developersdex
http://www.developersdex.com ***