Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > BOOK: Access 2003 VBA Programmer's Reference
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Access 2003 VBA Programmer's Reference
This is the forum to discuss the Wrox book Access 2003 VBA Programmer's Reference by Patricia Cardoza, Teresa Hennig, Graham Seach, Armen Stein; ISBN: 9780764559037
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Access 2003 VBA Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 9th, 2007, 06:29 AM
Registered User
Join Date: Nov 2007
Location: , , Botswana.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with Unbound Date field to link with SQL VBA

I am busy setting up a find/filter and sort feature for a table that will have a lot of data, in three months up to 2500 entries. I have used the SQL functions as described from page 420 in the Book. Of the nine filter field I have 8 are working with out a problem. In the main table (ACCOUNTS) I have a field called TRADATE set as Short Date. In the Filter query the same field exits. In the form I have an Unbound txtTID field set to short date format. The VBA and Sql is modified form page 422-427.

I have tried using the code for strings and for numerics but i have had no luck i keep getting an empty table as my result.
the code attached to the after update field is as follows

Private Sub txtTID_AfterUpdate()
On Error GoTo Error_Handler


On Error Resume Next
Exit Sub
MsgBox "An error has occurred in this application. " _
& "Please contact your technical support person and tell them this information:" _
& vbCrLf & vbCrLf & "Error Number " & Err.NUMBER & ", " & Err.DESCRIPTION, _
Buttons:=vbCritical, title:="My Application"
Resume Exit_Procedure
End Sub

the code attached to the selectrecords function is as follows

If Not IsNull(txtTID) Then
varWhereClause = (varWhereClause + strAND) & _
"qryFilterLedgerExpenses.TRADATE = " & Me!txtTID
End If
I thinks there is something wrong with my syntax so any help would be appreciated

In the VBA watch window I found that the date ends up with a " mark and hence no data is found.
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
unbound field in subform chacquard Access VBA 4 February 7th, 2007 10:01 AM
unbound field in a form zanza67 BOOK: Access 2003 VBA Programmer's Reference 0 September 3rd, 2005 01:46 PM
Unbound field lee27 VB Databases Basics 1 January 5th, 2005 07:53 AM
How to bind unbound field ? cjordan BOOK: Professional Crystal Reports for VS.NET 1 January 23rd, 2004 01:34 PM
Date in Access VBA (SQL) Kenny Alligood Access VBA 2 September 14th, 2003 08:35 AM

All times are GMT -4. The time now is 08:50 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.