M
Michael
Hi
I have a search function on my main form that brings up
anything that matches the same string on 3 fields, ID,
First Name, Surname, the results are then based in a list
box. I then dbl click on the correct record and it brings
up the first record that I want in my form- which works
(but when I click next - it goes to the next record-NOT
the next record for the person I selected)....but what I
want it to do is bring up the first record and apply the
filter so that when I click next on my form it goes to the
next record that I have selected.
This is the code I am using at dbl click. I think that it
is the 'DoCmd.FindRecord strString, acStart, , acDown, ,
acCurrent' that I need to amend....but I can't think what
to do
Private Sub Surname_DblClick(Cancel As Integer)
Dim strString As Double
strString = Forms![FrmCustomersMainMenu]![Surname]
'Open the form for entering information
DoCmd.OpenForm "FrmCustomerQuotes"
Forms![frmcustomerQuotes].[Customer ID].SetFocus
'Attempt to locate a quote and bring it up
DoCmd.FindRecord strString, acStart, , acDown, ,
acCurrent
'DoCmd.Close acForm, "frmcouncilsearch", acSaveNo
Forms![frmcustomerQuotes]![Customer ID].SetFocus
Forms![FrmCustomersMainMenu].[Command0].SetFocus
Forms![FrmCustomersMainMenu].Quote.Visible = False
Forms![FrmCustomersMainMenu].[Quotedetails] = " "
DoCmd.Close acForm, "frmcustomersMainmenu"
End Sub
Thanks for any help..
I have a search function on my main form that brings up
anything that matches the same string on 3 fields, ID,
First Name, Surname, the results are then based in a list
box. I then dbl click on the correct record and it brings
up the first record that I want in my form- which works
(but when I click next - it goes to the next record-NOT
the next record for the person I selected)....but what I
want it to do is bring up the first record and apply the
filter so that when I click next on my form it goes to the
next record that I have selected.
This is the code I am using at dbl click. I think that it
is the 'DoCmd.FindRecord strString, acStart, , acDown, ,
acCurrent' that I need to amend....but I can't think what
to do
Private Sub Surname_DblClick(Cancel As Integer)
Dim strString As Double
strString = Forms![FrmCustomersMainMenu]![Surname]
'Open the form for entering information
DoCmd.OpenForm "FrmCustomerQuotes"
Forms![frmcustomerQuotes].[Customer ID].SetFocus
'Attempt to locate a quote and bring it up
DoCmd.FindRecord strString, acStart, , acDown, ,
acCurrent
'DoCmd.Close acForm, "frmcouncilsearch", acSaveNo
Forms![frmcustomerQuotes]![Customer ID].SetFocus
Forms![FrmCustomersMainMenu].[Command0].SetFocus
Forms![FrmCustomersMainMenu].Quote.Visible = False
Forms![FrmCustomersMainMenu].[Quotedetails] = " "
DoCmd.Close acForm, "frmcustomersMainmenu"
End Sub
Thanks for any help..