Hi
I have a form (frmenquirysearch) dwhich displays a summary of all the records in tblenquiry in continous view.
I want to open up frmenquiry which is a detailed view of the records using a command button on frmenquirysearch. I used the command button wizard and it has given me the code below. However when clicked the frmenquiry opens but at the first record not at the record I selected on the frmenquirysearch
Any thoughts as to why??
On Error GoTo Err_cmdViewDets_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmenquiry"
stLinkCriteria = "[enqref]=" & Me.[enqref]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdViewDets_Click:
Exit Sub
Err_cmdViewDets_Click:
MsgBox Err.Description
Resume Exit_cmdViewDets_Click
Many thanks
Richard
I have a form (frmenquirysearch) dwhich displays a summary of all the records in tblenquiry in continous view.
I want to open up frmenquiry which is a detailed view of the records using a command button on frmenquirysearch. I used the command button wizard and it has given me the code below. However when clicked the frmenquiry opens but at the first record not at the record I selected on the frmenquirysearch
Any thoughts as to why??
On Error GoTo Err_cmdViewDets_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmenquiry"
stLinkCriteria = "[enqref]=" & Me.[enqref]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdViewDets_Click:
Exit Sub
Err_cmdViewDets_Click:
MsgBox Err.Description
Resume Exit_cmdViewDets_Click
Many thanks
Richard