Hi hope this is in he right forum!
I have the following code on an onlick event in a subform which searches the selected record and displays it on the main form.....it works great in Access 2000 / Xp but it doesn't work in Access 2000 runtime.???
I originally thought it would be a references problem, but a quick check and they seem to be in order
they are:
Visual Basic for Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft ActiveX Data object 2.1
Micrsoft DAO 3.5
And the code is as follows`
Private Sub Form_Click()
Dim sq As String
sq = "" 'set variable
Dim rsClone As Recordset
Set rst = Me.RecordsetClone
Forms!Main!JobNumber.SetFocus
DoCmd.FindRecord Me!JobNumber, acEntire, False, acSearchAll, True, acAll
End Sub
What happen is that is sets focus to JobNumber ok but then it just stays on the same record?? *&%6*@@"!! instead of search and displaying hte correct one (what happens when not in runtime)
Any help would be great because this is the last hurdle "I think" in my struggle against my first access DB!
Cheers,
John
I have the following code on an onlick event in a subform which searches the selected record and displays it on the main form.....it works great in Access 2000 / Xp but it doesn't work in Access 2000 runtime.???
I originally thought it would be a references problem, but a quick check and they seem to be in order
they are:
Visual Basic for Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft ActiveX Data object 2.1
Micrsoft DAO 3.5
And the code is as follows`
Private Sub Form_Click()
Dim sq As String
sq = "" 'set variable
Dim rsClone As Recordset
Set rst = Me.RecordsetClone
Forms!Main!JobNumber.SetFocus
DoCmd.FindRecord Me!JobNumber, acEntire, False, acSearchAll, True, acAll
End Sub
What happen is that is sets focus to JobNumber ok but then it just stays on the same record?? *&%6*@@"!! instead of search and displaying hte correct one (what happens when not in runtime)
Any help would be great because this is the last hurdle "I think" in my struggle against my first access DB!
Cheers,
John