>>There is of course a date value in Text767.
>>There are also records with matching date values in ??>>Appt_Date.
Both fields are formatted identically as short dates.
here are a few things you can try. First, create a test query to test
the datasource of your form (query the table or query that your form is
based on). In the criteria section for Appt_Date add a test date value
and run the query and see if it returns any records. If the query
returns records, then your table/query is OK, the fieldname is OK...the
datasource is working
If your datasourece is OK, then perform a similar test in the Filter
statement -- try hardcoding a test date value like this:
...
Me.Filter= "Appt_Date = #10/31/06#"
Me. FilterOn = True
...
or whatever your test date value is. If your test date value worked in
the Test query then it should work in the Filter statement. If it does
work, then the problem is with Text767. You can test Text767 by adding
this line of code to your Button procedure
Private Sub Command1_Click()
Debug.Print "*" & Text767 & "*"
Me.Filter= "Appt_Date = #10/31/06#"
Me. FilterOn = True
End Sub
You still have the hardcoded test date value, but you are using the
Debug.Print statement to test if any value is being read from Text767.
Note that I surround Text767 with "*" "*" This is so that if nothing is
being read you can at least see that the Debug.Print statement did run
because you will see ** in the Debug window. If the app can read
Text767 then you will see *10/31/2006* (or whatever your date value is).
If you aren't getting anything in the Debug window other than ** then
maybe the textbox you are referencing is the wrong textbox which could
be the case because it sounds like you have several textboxes on your
form - Text767? I usually see like Text0, Text1...Text10...Text20, but
Text767? That is a pretty high number. You know, you can rename a
textbox to something more meaningful like txtApptAte. Then there will
be no question what textbox you are referring too. Note, convention has
it that textbox names should be preceded by txt, comboboxes, cbo,
listboxes, lst, labels lbl, checkboxes, chk, radiobuttons, rad (wait -
that's in VB.Net) I guess they are called option buttons in Access -
opt.
Rich
*** Sent via Developersdex
http://www.developersdex.com ***