'Add' not updating list box from combo box immediately on 1 of 2 f

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 forms, each has a combo box from which the user makes a choice &
then presses the Add command button to enable this choice to appear in a list
box on the form.

On one form the choice appears in the list box as soon as the user presses
Add but on the other form the choice doesn't appear immediately after
pressing Add - you have to move to another record & then back again to get
the choice to appear in the list box.

I've compared the properties of the combo/list boxes & Add button as well as
the underlying code & I can't find anything different between the forms that
could be causing this anomaly (both forms use the same row source for the
combo box, it's just that one form enables the 'choice' to be paired with one
type of information & the other allows the 'choice' to be paired to different
information).

Please help! I've looked all over the forum & not been able to find anyone
else with this problem.

Thanks in advance
Heidi
 
This is my first database & I'm learning as I go along so please excuse me if
I sound like I don't understand what I'm talking about!

I use Requery in the code of both of the forms & in the same way but one
updates immediately & the other doesn't hence why I am confused! I've pasted
in the code below re. the Add Command button for both forms:

The form below updates immediately:

Private Sub Command56_Click()
Dim MySet As Recordset
Set MySet = CurrentDb().OpenRecordset("CourseModLink")
MySet.AddNew
MySet![Course] = [Course Title]
MySet![Module Code] = Combo50
MySet.Update
MySet.Close
List52.Requery
Combo50 = Null
Combo50.Requery
End Sub

The form below requires me to move to another record & back for the 'choice'
to appear in the List Box:

Private Sub Command86_Click()
Dim MySet As Recordset
Set MySet = CurrentDb().OpenRecordset("EEModLink")
MySet.AddNew
MySet![External Examiner] = [External Examiner]
MySet![Module Code] = Combo80
MySet.Update
MySet.Close
List82.Requery
Combo80 = Null
Combo80.Requery
End Sub

I'm hoping that being new to all this I'm just missing something really
obvious!
Heidi
 
Back
Top