Ughh Help please!!

TizaEliza

New member
Local time
Today, 03:17
Joined
Jul 1, 2003
Messages
6
HI, people ok some of you will think i am pretty retarded for asking this but i don't have much of a clue about VB more of a net language gurl, but i am making modifications to a complicated DB and learning about access on the way!!! ok basicly is it possiable to have a button on the form which when pressed would create a new form -poped up which would display the PK (say a customer ID) for every record that contains an expire date for that week. (i guess u need some sort of *this is todays date so therefore the next 4 dates are* function there somewhere) if this is possiable HOW!!!!?!??!?!??! please help!!!!!!! i'm an undergraduate trying to get by!!!!! =0) cheers me dears!!!!!!! x x x
 
You don't need VB for that, a plain 'ol select query will do that for you.
In the qbe grid, select the fields you want to show and set the criteria for the date field as follows

Between Date() and DateAdd("d",4,Date())

This assumes that today is a Monday - if you want this to be accurate for any day of the week up to a Friday for example, you will need to use a function or nested IIf's in the criteria to set the date range

how you use this data is up to you. You can use it to supply the form and therefore have a separate record for every ID (either in simple or continuous form mode) or you could use the data to populate a listbox or combo.
 
Or you could also just toggle a filter on the form you already have
 
Or use textboxes to set the dates you want to question (forgot about the easier option:p ) and use these to populate the criteria
 

Users who are viewing this thread

Back
Top Bottom