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!

Form: text box defined query 1

Status
Not open for further replies.

luke242

Technical User
May 24, 2001
11
US
Hello,
Right now I have a query that takes a user input for the current week (ex: 0 is this week, 1 is next week, etc) and brings back all the appointments during this week.

The criteria for this is as follows:
>=(Now()+7*[UserWeek])+(-Weekday((Now()+7*[UserWeek]),2)+1) And <=(Now()+7*[UserWeek])+(-Weekday((Now()+7*[UserWeek]),2)+7)

What I want to do is create a form where the user inputs the data for what week they want (like 0, 1, etc) and then all the information for that week would be displayed below.

I am pretty new to forms, so I was wondering how to conceptually approach this. Do I need to use a subform? How do I link the fields to the user inputted data on the form? How do I make the display update automatically when this text box is changed?

Any help would be greatly appreciated.

~Luke Campbell
 
hi

I am pretty new to forms, so I was wondering how to conceptually approach this. Do I need to use a subform?

Since the diary is probably a list, a sub form sounds appropriate

How do I link the fields to the user inputted data on the form?

in the query on which the sub form is based, set the criteria to the controls (on the main form) where the user inputs the data, using syntax like FORMS!MyForm!MyControl, the query criteria builder will guide you through this, you need to use your own form and control name sof coutrse in place of my "My" examples

How do I make the display update automatically when this text box is changed?

in the after update event of the text box control(s) requery the sub form with code like so

MySubFormControl.requery

agian using your own control name inplace of "my" example name


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top