Pop up event based on a date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create a form that includes a field 'Instore date'. What we would
like is that (only) if you open the form a pop up window will appear to
notify you of any records where 'Instore date' is less than two weeks away.
You would then have a choice to click yes and be taken to that record.
There is another field 'Status'. This can be one of four options:
InProgress/Cancelled/Postponed/Produced.
The default is InProgress.
If the status is changed to Cancelled or Produced then the macro should not
bring up the window. Postponed means the 'Instore date' was changed.
I have worked on some simple macro's and script but not sure how to apply
this to the pop up forms.
As always, any help will be much appreciated.
Thank you.
 
Graeme,

I think this is the easiest way to do this...

1. Make a query, using Criteria to select records with Instore date
within 2 weeks, and Status being InProgress or Postponed.

2. Make a continuous view form, based on that query as its Record
Source. This assumes it is possible that there could be more than one
required record, so you can see relevant details.

3. Make a macro, using the OpenForm action to open this form.

4. In the Condition of the macro, put the equivalent of this...
DCount("*","YourQueryInStep1")>0

5. Assign this macro on the Open event of the exisiting form.

6. Make another macro to assign on the Click event of a command button
on the popup form, probably using the FindRecord action, to select the
required record and then close the popup form.

Hope that makes sense. Let us know if you need more detailed help with
any of these steps.
 
Thanks Steve,
I'll give that a go.

Steve Schapel said:
Graeme,

I think this is the easiest way to do this...

1. Make a query, using Criteria to select records with Instore date
within 2 weeks, and Status being InProgress or Postponed.

2. Make a continuous view form, based on that query as its Record
Source. This assumes it is possible that there could be more than one
required record, so you can see relevant details.

3. Make a macro, using the OpenForm action to open this form.

4. In the Condition of the macro, put the equivalent of this...
DCount("*","YourQueryInStep1")>0

5. Assign this macro on the Open event of the exisiting form.

6. Make another macro to assign on the Click event of a command button
on the popup form, probably using the FindRecord action, to select the
required record and then close the popup form.

Hope that makes sense. Let us know if you need more detailed help with
any of these steps.
 
Hi Steve,
thanks for the help.
Steps 1 to 5 are working fine.
Can you help on step 6?
What I think should be happening is that on the continuous(pop up) form I
add two command buttons. One to find the record and the other to close the
form.
How do I get the command to find the record in the other (mother) form?
Lets say my 'mother' form is called Product and the pop up form that we have
created here is called Notification.

Cheers,

Graeme
 
Back
Top