Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 13th, 2004, 07:39 PM
Authorized User
 
Join Date: Jun 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Raif
Default findfirst help

Hi, I have field "date" in a mainform based on table "dates" on that main form I have a subform based on table "daysofweek" with field "monday". I want to put a button on main form that using VBA searches all the records in table "daysofweek" ( not just the one showing in the subform ) for a match between "date" and "monday".
Now I know there are other ways of achieving this such as a combobox or whatever but I want to learn this function so I can use it elsewhere as well. Any help would be greatly appreaciated!
Thanks,
Raif
[email protected]

 
Old June 14th, 2004, 03:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

First, change the name of your variable. The word "Date" is a reserved keyword in Access. There is a function called Date() that gives you todays date (or actually, the date your computer is set for... presumably, today). Change it to something unique, e.g. dtmDate.

The function that tells you the day of the week of a date is Weekday. Search help on Weekday to see how it works.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Solved-RS.FindFirst and Multiple Column ComboBox eusanpe Access VBA 0 May 19th, 2008 01:25 PM
Using FindFirst in Dropdown Field rmurray VB How-To 0 July 26th, 2007 09:54 AM
FindFirst: Method or data meber not found Totenkopf Access 2 May 26th, 2006 11:05 AM
FindFirst retrieves wrong record Derek_05 VB Databases Basics 1 March 6th, 2006 01:50 PM
findfirst function and vc++ amira C# 0 September 29th, 2005 07:42 AM





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