Javelin
The Backpacker
- Local time
- Today, 02:38
- Joined
- Mar 14, 2003
- Messages
- 12
Can someone please help?
I have a database where the users can view all the records, via a form, in read-only format. Should the user wish to change any details at all on a particular record - they are forced to complete an audit trail first.
All this simply means is that at the bottom of each record (form) there is a link to the audit trail - this link was created using the command wizard to select the specific record. This is the code that is produces;
Private Sub Command51_Click()
On Error GoTo Err_Command51_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Amend Risk"
stLinkCriteria = "[Risk No]=" & "'" & Me![Ref No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close "Audit Testpage"
Exit_Command51_Click:
Exit Sub
Err_Command51_Click:
MsgBox Err.Description
Resume Exit_Command51_Click
End Sub
My problem is that I want the form the user is leaving (i.e. The Audit Testpage) to close once the command link is clicked to open the Amend Risk [form]. What code do I need to enter?
Thanks
Jav

I have a database where the users can view all the records, via a form, in read-only format. Should the user wish to change any details at all on a particular record - they are forced to complete an audit trail first.
All this simply means is that at the bottom of each record (form) there is a link to the audit trail - this link was created using the command wizard to select the specific record. This is the code that is produces;
Private Sub Command51_Click()
On Error GoTo Err_Command51_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Amend Risk"
stLinkCriteria = "[Risk No]=" & "'" & Me![Ref No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close "Audit Testpage"
Exit_Command51_Click:
Exit Sub
Err_Command51_Click:
MsgBox Err.Description
Resume Exit_Command51_Click
End Sub
My problem is that I want the form the user is leaving (i.e. The Audit Testpage) to close once the command link is clicked to open the Amend Risk [form]. What code do I need to enter?
Thanks
Jav
