Hello,
I have a pop form call frmPopDivisions(user can select item in this form's combox), and other form called frmPickDates. the pickDates form have the sub form that the sun form called Veh_Sched_sub.
My problem is, when I click pop form button then the button link to the frmPickDates. if the frmPickDates is no data then click the button link to the frmPopDivisions again i the frmPickDates. when I click pop form's button again in the frmPickDates, the sub form Veh_Sched_sub's data should be changed. but that's doesn't work for me.
Please help me out.
Thank you very much for your kind help.
Wdu
The following are my codes:
Private Sub Command74_Click()
' fromPickDates's button
DoCmd.OpenForm "frmPopDivisions"
DoCmd.OpenForm "PickDates"
Forms("PickDates".Vehicle_Sched_subform.Form.Requery
End Sub
Private Sub Command5_Click()
'frmPopDivisions's button
On Error GoTo Err_Command5_Click
DoCmd.OpenForm "PickDates"
DoCmd.Close acForm, "frmPopDivision"
If Forms!PickDates.Visible = True Then
Forms("PickDates".Vehicle_Sched_subform.Form.Requery
End If
DoCmd.Close acForm, "Menu"
' Hide form.
Me.Visible = False
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub
I have a pop form call frmPopDivisions(user can select item in this form's combox), and other form called frmPickDates. the pickDates form have the sub form that the sun form called Veh_Sched_sub.
My problem is, when I click pop form button then the button link to the frmPickDates. if the frmPickDates is no data then click the button link to the frmPopDivisions again i the frmPickDates. when I click pop form's button again in the frmPickDates, the sub form Veh_Sched_sub's data should be changed. but that's doesn't work for me.
Please help me out.
Thank you very much for your kind help.
Wdu
The following are my codes:
Private Sub Command74_Click()
' fromPickDates's button
DoCmd.OpenForm "frmPopDivisions"
DoCmd.OpenForm "PickDates"
Forms("PickDates".Vehicle_Sched_subform.Form.Requery
End Sub
Private Sub Command5_Click()
'frmPopDivisions's button
On Error GoTo Err_Command5_Click
DoCmd.OpenForm "PickDates"
DoCmd.Close acForm, "frmPopDivision"
If Forms!PickDates.Visible = True Then
Forms("PickDates".Vehicle_Sched_subform.Form.Requery
End If
DoCmd.Close acForm, "Menu"
' Hide form.
Me.Visible = False
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub