Sounds like you have not correctly renamed the textbox.
All I did was download your db and do the described edits. Form works.
Did you download the revised db offered by Steve?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Just saw your post, I will open the Db and see what it looks like and try to clear some of my confusions, lol. Sorry for the irritants, novice says it all but trying to learn properly from you guys and you all have my utmost respect for what you deal with.I looked at your dB and became a little frustrated with the (lack of) naming convention..... so I changed a lot of names.
As noted, cannot check out as the dB stands because the form is in data entry mode. You could use VBA to find the already entered record for a badge number, job number, check in date, then set the check out date/time.
I set the global variables in the button click. Seemed easier than using more code in the submit button.
I removed the requires setting for the visitor badge number. If you have a work badge, how would you also have a visitor badge??
I renamed a lot (if not all) controls and most of the field names. I added PK/FK relationships. and properly (IMO) set up the combo boxes.
I added the prefix "frm" to the form name. Not real good idea to have multiple objects with the same names (table named "Initial" and form named "Initial").
I also removed the Layout formatting.
Attached is the modified dB..
i just responded to him, opening it as we speak.
Ok, the form does work as it is; Steve or June7, I am really trying to streamline the check out process with them choosing the check out button, entering their ID and updating their check in record with check out info. Is it as easy as accessing the users most recent record via something like 'Select from 'form' where tbxID.....'?
Let's presume if everything works properly, an employee will only ever have 1 record with CheckOut field Null and CheckIn should never be null so code can update the record with:
CurrentDb.Execute "UPDATE Initial SET CheckOut = Now() WHERE BEMSID = " & Me.cbxSelectEmployee & " AND CheckOut Is Null;"
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Well if that ain't some shit!! I walked away for 10 minutes and someone came by and stole my usb card from the pc 'under' my desk. All of my database work, gone to some freakin theives!!
You know, I have you guys to thank for having me share it with you all. I almost forgot that I put it out there. I may have to put some other stuff back in it but at least I still have it. June7, I will give that a try as soon as I can get back to where I was. Thanks again everyone for everything!!!
This would be in the Submit event correct? This is great, but...., how do I get them to just enter their ID after hitting Check Out so that it knows whose record to update, you follow what I'm trying to do? I don't want them to have to re-enter all of the information again. Is this possible with my design?Let's presume if everything works properly, an employee will only ever have 1 record with CheckOut field Null and CheckIn should never be null so code can update the record with:
CurrentDb.Execute "UPDATE Initial SET CheckOut = Now() WHERE BEMSID = " & Me.cbxSelectEmployee & " AND CheckOut Is Null;"
Re-enter what information? All they need to do is select name/id from an unbound combobox.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
That's the suggestion.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I'll give that a shot, thanks!
I wrote that assuming you are using that ID scanner/computer just for check in/out. The way I suggested doing it would allow the staff to just walk up to it, scan their id, and be checked in/out. There would be no need for mouse/keyboard. If that is not the case, don't make the button default.So is this just for my Submit button or is this a whole new form to be created, maybe I misunderstood you earlier?? Also, are you referring to the Submit button being the all-in-one button, Check In/Out? Only reason I'm asking is because they have a line up of people behind them at checkout so I'm trying to streamline the checkout process to get people out faster with the scan Id, access the 'In' record and update it with checkout info.
Actually there is more info that would be entered; location, supervisor, etc.I wrote that assuming you are using that ID scanner/computer just for check in/out. The way I suggested doing it would allow the staff to just walk up to it, scan their id, and be checked in/out. There would be no need for mouse/keyboard. If that is not the case, don't make the button default.