S
sharontodd
I am in a form (Winners) that views data via two list boxes "first_data" and
"first_data2" that was entered in a different form (Reg). There is a command
button that opens Reg so the data can be corrected if needed. How do I get
the two list boxes to update when returning from the Reg form. I tried to
Requery both boxes at a variety of locations. I have the following code for
On click (showing all locations I've tried to Requery). Do I need to do
something else/somewhere else?
Private Sub First_Data_Update_Click()
On Error GoTo Err_First_Data_Update_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Registrations"
stLinkCriteria = "[Reg#]=" & Me![First]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me.First_data.Requery
Me.first_data2.Requery
Exit_First_Data_Update_Click:
Me.First_data.Requery
Me.first_data2.Requery
Exit Sub
Err_First_Data_Update_Click:
MsgBox Err.Description
Resume Exit_First_Data_Update_Click
Me.First_data.Requery
Me.first_data2.Requery
End Sub
"first_data2" that was entered in a different form (Reg). There is a command
button that opens Reg so the data can be corrected if needed. How do I get
the two list boxes to update when returning from the Reg form. I tried to
Requery both boxes at a variety of locations. I have the following code for
On click (showing all locations I've tried to Requery). Do I need to do
something else/somewhere else?
Private Sub First_Data_Update_Click()
On Error GoTo Err_First_Data_Update_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Registrations"
stLinkCriteria = "[Reg#]=" & Me![First]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me.First_data.Requery
Me.first_data2.Requery
Exit_First_Data_Update_Click:
Me.First_data.Requery
Me.first_data2.Requery
Exit Sub
Err_First_Data_Update_Click:
MsgBox Err.Description
Resume Exit_First_Data_Update_Click
Me.First_data.Requery
Me.first_data2.Requery
End Sub