auto popup

wort0987654321

Registered User.
Local time
Today, 16:26
Joined
Dec 5, 2002
Messages
90
i have a form that displays any records of rentals that are due back on todays date. is there anyway that i can get the form to automatically open at 6:00am when there is a record present, and not open if there arent any rentals due back today. a like the date manager function on the computer clock
 
Why would you want the form to open at 06:00am? In order to do so you would have to ensure that the database was in use at this time.

A better approach would be to open the form when the database is opened. You could base the form on a query which looked at the date due back field and only returned records where this field was equal to the current date.

In your code for opening the form do a recordset count and if this equalled 0 then cancel the opening of the form.

Job done.

Cheers

Flyer
 
i am currently opening the database with a splashscreen which is ran by a macro. so how owuld i go about doing what you have said. sorry if this seems a little dumb but i finnd these things difficult to do.
 
wort,

You can make a form that shows all rentals
due. Then make a new table with one field
for the date (short format) that you last
accessed the database.

tblCheckDate:
LastDateChecked

In your db's splash screen, use the OnOpen
event:

Code:
If IsNull(DLookUp("[LastDateChecked]", "tblCheckDate", "[LastDateChecked] = #" & Date() & "#")) Then
   dbs.Execute("Insert into tblCheckDate (LastDateChecked) Values (#" & Date & "#);")
   DoCmd.OpenForm "ShowRentals"
End If

Wayne
 
every time i enter your code into the vb i get an error message saying run time error 424, object required.

am i doing something wrong here.

thanks for the help so far
 
wort,

Try:

CurrentDb.Execute

or

Dim dbs As DAO.Database
Set dbs = CurrentDb
dbs.Execute ...

Wayne
 
Wort,

Could you post a sample of your database (only include enough info in the tables so that we can see what y9ou are trying to achieve) - this would make it much easier to solve your problem.

Cheers

Flyer
 
here is part of my system, i had to cut it down alot.

i want a form to open once the main menu has opened that tells the user that there is a car due back today (if there are any cars due back today). i would like the form to contain a command button which will open the form showing cars that are due back today.

does this make it easier to understand?
 
here is part of my system, i had to cut it down alot.

i want a form to open once the main menu has opened that tells the user that there is a car due back today (if there are any cars due back today). i would like the form to contain a command button which will open the form showing cars that are due back today.

does this make it easier to understand?
 
here is part of my system, i had to cut it down alot.

i want a form to open once the main menu has opened that tells the user that there is a car due back today (if there are any cars due back today). i would like the form to contain a command button which will open the form showing cars that are due back today.

does this make it easier to understand?
 
Wort,

You will probably have to compact and repair the database then zip it to get the file size down to a level which you can post on here.

Alternatively send me a PM and we can arrange for you to email the database to me in either A97 or A2000 format.

Cheers

Flyer
 

Users who are viewing this thread

Back
Top Bottom