help please, how to save a data between the time of what user input in the 2 textbox. 1 textbox is for intime and the 2 one is out time.

for example if the user input

7:30 - 9:30 Am Intime

all i want is this is the only time that the user can save a data into a database. if the time will come to 9:31 this is the time that the user cannot add anymore. the user can only add a data between 7:30 - 9:30 AM please help. badly needed.

I don't quite understand your question. Could you rephrase it once again in a little more detail?

So you want to limit access to the database based on access times. Well then, you will need some sort of table in the database that contains the user and the start/stop access times. Then at program start you would query for this information plus you would need to query a machine other than the users machine for what time it is via the netremotetod API....

http://support.microsoft.com/kb/249716/EN-US/

However, since you can see that is in C you will need to convert it to VB (Good Luck).

Now, this will only tell you at program startup if the user has the right to access the database and if they don't you should end the program with an informative message of not yet or time expired.

But, once the program is running you will need to occasionally check the machine you have designated as your time server. Hopefully, you will pick a machine that is not to busy and you may need to ask you network admin on which machine you should point this api to. So, you could check via the api prior to updates to see if the user has permissions.

Now, the reason I am pointing you to this fairly difficult API is because it is a very simple task for the user to change the time on their computer but if you have your code pointed at a machine they cannot get their hands on, well then, you will be keeping them honest.

Good Luck

help please, how to save a data between the time of what user input in the 2 textbox. 1 textbox is for intime and the 2 one is out time.

for example if the user input

7:30 - 9:30 Am Intime

all i want is this is the only time that the user can save a data into a database. if the time will come to 9:31 this is the time that the user cannot add anymore. the user can only add a data between 7:30 - 9:30 AM please help. badly needed.

Please supply your current code including your connection to the database so that it would be easy to find solution to your problem.

tnx

this is my connection to my database

Public Sub conn()
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\attendance.mdb;Persist Security Info=False"
End Sub

please help me about the time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.