Automatically event trigger on some specific time, even though i am not on that page / whil surfing other page.

Dear Experts,
Good day,

I am working on Reservation system, where i wrote a code if that record date gets equal to current date ... then
Just insert the same record one more time in DB, code is written below but i have a general question ....

It works fine if i stay on that page, but what if the page is not open and i would like to generate that event behind the scene.
I hope you got my idea ....
I do not want to be on the page to let that event trigger, i just want when some particular time which i will mention if arrives record inserted int DB.

I am using VB and MS ACCESS as DB. PLS HELP

      If Convert.ToDateTime(mytxtboxdepart.Text) > Convert.ToDateTime(mytxtarrivon.Text) And mynightrun = Now.ToLocalTime.ToLongTimeString Then
                    'MsgBox(txtBoxTimer.Text & " = " & Now.ToLocalTime.ToLongTimeString)

                    Me.myAccessConnection.ConnectionString = Me.connStr
                    command.CommandText = "insert into ReservationTb([confirmid],[Gname],[ArrivalOn],[Departure],[Nights])values (confirmid,Gname,ArrivalOn,Departure,Nights)"
 end if
Kamran MahmoodAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
i would like to generate that event behind the scene.
Where would you be getting the Values you're inserting if you're not on a Page/Form? Are you storing those somewhere? If so, why not just store them directly in the database instead?

Most applications are event-driven, meaning a user causes an "event", and that event performs some sort of action. If your page is not loaded, there is no way for any events on that page to take place. You can create automated processes by creating a Service application, or using a Scheduled Task, but otherwise some event must occur (user clicks a button, or a Timer reaches an interval, etc) in order for your application to take action.
Technically you are not using Access at all.  Jet and ACE are the database engines that are commonly confused with Access but when you are using Jet or ACE on a server as the BE for a web application, Access doesn't even  have to be installed.

If you are using ACE (.accdb) a data macro might solve your problem if you want something to happen when a record is inserted.  However, these are quite limited and have no where near the capability of a trigger.  Jet/ACE are really a poor choice as the BE for a web app.  You are far better off using MySQL or SQL Server where you will have a fully capable database engine at your disposal.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kamran MahmoodAuthor Commented:
Thanks guys for the brief ..
I will close the question.
You're welcome.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.