Filter help please!

AndyShuter

Registered User.
Local time
Today, 18:38
Joined
Mar 3, 2003
Messages
151
Im sure the answer to this is dead simple, but I cant seem to engage my brain at the moment.

What I want to do is open up a form and show only records that match today. Here is the code I have attemted to use, but I think it's wrong!

Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmLog"
stLinkCriteria = [DateDealIn] = Date()
DoCmd.OpenForm stDocName, , , stLinkCriteria

Any help would be much appreciated!

Happy New Year

Andy
 
Hi Andy,

Try this....

Dim stLinkCriteria As String
stLinkCriteria = stLinkCriteria & "[DateDealIn] = " & Me.yourtextbox &""
DoCmd.OpenForm "frmLog", , , stLinkCriteria

set properties tab of the textbox - Default Value to Date()
or in VB - yourtextbox.DefaultValue = "Date()"

HNY
 
Thanks mate, works a treat

HNY Again!!!!
 

Users who are viewing this thread

Back
Top Bottom