Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help in syntax

Status
Not open for further replies.

SAM453

Programmer
Jun 6, 2011
18
US
Hi i have a table which contains date column with varchar(15) datatype. On front end i'm using calender and passing the start date and end date from calender on to this column.

date displayed in my table is 20091231 (yyyymmdd)

Below is the code which i'm trying:

strCriteria3 = "Cdate(Format$([Date_Created],"mm/dd/yyyy")) Between #" & Me.Text8 & "# and #" & Me.Text18 & "#"

If IsNull(Text8) = False And IsNull(Text18) = False Then
DoCmd.OpenTable "Staging_Lottery_CA_SALES_LOAD_REJECT"
'DoCmd.Hourglass True
DoCmd.ApplyFilter , strCriteria3
'DoCmd.Hourglass False
End If

Where i'm wrong in above syntax???

Another question after opening a table in my front end my filter conditions are not showing up ?? What is the reason for this??? how can i have filter in my table in front end????

Thanks,
SAM.
 
I would create a form based on the table and then open the form rather than the table. You can use a where condition when you open the form to provide a filter.

Duane
Hook'D on Access
MS Access MVP
 
How are ya SAM453 . . .

You want to apply the filter if [blue]Text8[/blue] & [blue]Text18[/blue] are both [blue]Null[/blue] ... then there's no comparison data! Perhaps you meant:
Code:
[blue]If Not IsNull(Text8) And Not IsNull(Text18) Then[/blue]

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top