R
RFJ
I have a command button in one form that I use to open a second form (with
the second form opening to show the record that was open in the first form).
However, if the record in form one is not first saved then the second form
just shows a blank.
As VB coding is new to me I don't know what to add to get form 1 to save
first (I guess it is just one line of code)
Can SKS help out. The actual coding currently associated with the command
button is below. The name of the form I want to save is :
MAINFORM_Participant_Entry
TIA
Rob
<start>
MsgBox Err.Description
Resume Exit_Go_to_Data_Entry_Click
End Sub
Private Sub DataEntryButton_Click()
On Error GoTo Err_DataEntryButton_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "MAINFORM_Data_ Entry"
stLinkCriteria = "[Org_Name]=" & "'" & Me![Org_Name] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_DataEntryButton_Click:
Exit Sub
Err_DataEntryButton_Click:
MsgBox Err.Description
Resume Exit_DataEntryButton_Click
End Sub
<end>
the second form opening to show the record that was open in the first form).
However, if the record in form one is not first saved then the second form
just shows a blank.
As VB coding is new to me I don't know what to add to get form 1 to save
first (I guess it is just one line of code)
Can SKS help out. The actual coding currently associated with the command
button is below. The name of the form I want to save is :
MAINFORM_Participant_Entry
TIA
Rob
<start>
MsgBox Err.Description
Resume Exit_Go_to_Data_Entry_Click
End Sub
Private Sub DataEntryButton_Click()
On Error GoTo Err_DataEntryButton_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "MAINFORM_Data_ Entry"
stLinkCriteria = "[Org_Name]=" & "'" & Me![Org_Name] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_DataEntryButton_Click:
Exit Sub
Err_DataEntryButton_Click:
MsgBox Err.Description
Resume Exit_DataEntryButton_Click
End Sub
<end>