I have a contact form that once the contact information is filled out,
a button is pressed by the user to pull up another form that schedules
a call back date and time for that record. If you hit that button on
a current record that already has a call back scheduled, it will show
that information for that contact already in the form. If nothing is
scheduled, the pull down box for that new record will be blank. Of
course, the new record will not show up in the pull down box unless I
hit the refresh button on the first form (contact) first before
hitting the call back button. So, if you're still with me, what I am
attempting to do is cause a refresh of the first form while invoking
the call back button (so the new contact will appear in the drop down
box without seperately hitting the refresh button), and/or if possible
when clicking on the call back button, having a new call back record
created, with the current (new) contact already selected in the
contact drop down box. Here is my current code for the button:
Private Sub Calls_Click()
On Error GoTo Err_Calls_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "CallsForm"
stLinkCriteria = "[Company]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Calls_Clic k:
Exit Sub
Err_Calls_Click :
MsgBox Err.Description
Resume Exit_Calls_Clic k
End Sub
a button is pressed by the user to pull up another form that schedules
a call back date and time for that record. If you hit that button on
a current record that already has a call back scheduled, it will show
that information for that contact already in the form. If nothing is
scheduled, the pull down box for that new record will be blank. Of
course, the new record will not show up in the pull down box unless I
hit the refresh button on the first form (contact) first before
hitting the call back button. So, if you're still with me, what I am
attempting to do is cause a refresh of the first form while invoking
the call back button (so the new contact will appear in the drop down
box without seperately hitting the refresh button), and/or if possible
when clicking on the call back button, having a new call back record
created, with the current (new) contact already selected in the
contact drop down box. Here is my current code for the button:
Private Sub Calls_Click()
On Error GoTo Err_Calls_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "CallsForm"
stLinkCriteria = "[Company]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Calls_Clic k:
Exit Sub
Err_Calls_Click :
MsgBox Err.Description
Resume Exit_Calls_Clic k
End Sub
Comment