Joseph
If you don't know about Access or programming then the best thing is to start by reading the Help within Access.
You need to look-up topics on;-
About Tables
Create a Table
About Forms
Create Form
About Filters
Applying a Filter
They will give you a good start on how and why to do things. The topics are better illustrated than an explanation that can be given here.
If I have mis-understood your capabilities and you don't want your users to learn to Filter By Form to apply a filter, then you will need to create the three text boxes in the Header area of your form.
You will need three public string variables, lets call then sVIN, sBegin, & sEnd
in the After_Update event of txtVIN you need something like
- If Me.txtVIN= "" Then
-
sVIN = "[VIN] <0"
-
Else
-
sVIN = "[VIN]= '" & Me.txtVIN & "'"
-
EndIf
-
-
DisplayData
-
Have assumed VIN is alpha-numeric
In the After_Update event of txtBeginDate you will need
- If Me.txtBeginDate = "" Then
-
sBegin=""
-
Else
-
sBegin = " and [BeginDate] =#" & Me.txtBeginDate & "#"
-
EndIf
-
-
DisplayData
-
You will need a similar statement in the After_Update event of txtEndDate and it is presument that the field nmes of your database are [VIN], [BeginDate] and [EndDate]
You will need a module called DisplayData which will be like;=
- Private Sub DisplayData()
-
Dim strCriteria as String
-
-
strCriteria = sVin & sBegin & sEnd
-
Me.Filter = strCriteria
-
Me.Filter = On
-
-
End Sub
-
Let's know how you get on
S7