Hi
had to take a sideways step on my database to add another search option.
I wrote this code and saved it in a module called DeclareVariable
Option Compare Database
Code:
Sub DeclareVariables()
Dim varGraveNo As String
varGraveNo = Me![GraveNo]
End Sub
I then created a form called frmPlotSearch with a text box called GraveNo
Added a button to open another form - frmPlotandGraveNo - based on the query below.
Code:
SELECT tblDeceased.GraveID, tblDeceased.Mlink, tblDeceased.Plot, tblDeceased.GraveNo, tblDeceased.Forenames, tblDeceased.Surname, tblDeceased.Age, tblDeceased.YearOfDeath
FROM tblDeceased
WHERE (((tblDeceased.GraveNo)="varGraveNo"));
My logic was the user opens the form types in a grave no say 22 pressed the button and the query runs filtering the results to only include grave no 22
I've now after hours of looking realised I have not included creating my variables. How can I include the creation of the variable in my sequence or am I totaly off track
thanks
Ian