R
Rachel
Hi,
I have a hugeof a problem, I have a form called frm_Search and on
this
form I have a command button which opens a popup form (frm_Invoice),
I
have a command button on the popup form also, which when pressed re-
query's the form 'frm_Search'. This is to ensure that data entered
(frm_Invoice) is displayed in the 'frm_search' form.
However, once it has re-queried the record position (on the
frm_Search
form) goes back to the first record and not the record that has been
updated via the frm_Invoice popup form.
I understand from reading up on this issue, that when something is
re-
queried the bookmark doesn't work.
I am totally lost with this now and any help would be greatly
appreciated. I have tried scanning the net for record clone
information etc but I just seem to get even more confused
This is my code from the popup form command button (frm_Invoice):
Private Sub cmd_Save_Invoice_Click()
On Error GoTo Err_cmd_Save_Invoice_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70
Forms!frm_Search.Requery
Exit_cmd_Save_Invoice_Click:
Exit Sub
Err_cmd_Save_Invoice_Click:
MsgBox Err.Description
Resume Exit_cmd_Save_Invoice_Click
End Sub
This is my code from the command button on the frm_Search form (which
opens the popup form):
Private Sub cmd_Invoice_Click()
On Error GoTo Err_cmd_Invoice_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_Invoice"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmd_Invoice_Click:
Exit Sub
Err_cmd_Invoice_Click:
MsgBox Err.Description
Resume Exit_cmd_AddInvoice_Click
End Sub
Many Thanks
Rachel
I have a hugeof a problem, I have a form called frm_Search and on
this
form I have a command button which opens a popup form (frm_Invoice),
I
have a command button on the popup form also, which when pressed re-
query's the form 'frm_Search'. This is to ensure that data entered
(frm_Invoice) is displayed in the 'frm_search' form.
However, once it has re-queried the record position (on the
frm_Search
form) goes back to the first record and not the record that has been
updated via the frm_Invoice popup form.
I understand from reading up on this issue, that when something is
re-
queried the bookmark doesn't work.
I am totally lost with this now and any help would be greatly
appreciated. I have tried scanning the net for record clone
information etc but I just seem to get even more confused
This is my code from the popup form command button (frm_Invoice):
Private Sub cmd_Save_Invoice_Click()
On Error GoTo Err_cmd_Save_Invoice_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70
Forms!frm_Search.Requery
Exit_cmd_Save_Invoice_Click:
Exit Sub
Err_cmd_Save_Invoice_Click:
MsgBox Err.Description
Resume Exit_cmd_Save_Invoice_Click
End Sub
This is my code from the command button on the frm_Search form (which
opens the popup form):
Private Sub cmd_Invoice_Click()
On Error GoTo Err_cmd_Invoice_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_Invoice"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmd_Invoice_Click:
Exit Sub
Err_cmd_Invoice_Click:
MsgBox Err.Description
Resume Exit_cmd_AddInvoice_Click
End Sub
Many Thanks
Rachel