Editing Data in a Form

jwbrickner87

New member
Local time
Today, 09:18
Joined
Jul 25, 2004
Messages
8
I am setting up a database that takes and keeps Attendance records. The data is imported from a barcode scanner. In the database there are two tables one table has contact info for each member, the other table has a column for each event we have. The barcode scanner acts similary to a keyboard it types out whatever it scans. when we take attendance I have it setup that on the card each member has there is a numner and the barcode. The number on the card corresponds with number of the record that holds that person's info. To make thie attendance taking process fast i have set up a form inwhich the person taking attendance can enter the number of the record in the database thats on the card so it will bring up the person's info. On the same form there is a field from the other table. When taking attendance the record is pulled up and the person taking attendance puts the cursor in the field from the second table. Then when we try to edit that field it won't let us. My only problem is that when I have two fields that are from 2 different tables and it won't let me edit the data and therefore not take attendance! Is there a solution to do this? Or is there a better way?
The bottom line is this:
I need a database in which I can easily and quickly enter attendance info into any record at anytime. There is no particular order in which the attendance is taken and they mark for attendance whatever it is must be displayed in either a table or a query next to the person's contact info to whom the attendance info belongs. I hope I made sense :confused: please help.
 
Thanks for help

Thanks for you help. But I have decided to go in a slightly diffrent direction with this project here is my new question. I have a bar code scanner, its called a keyboard wedge. It plugs into your keyboard port (It also has a y cable that will allow you to use keyboard and the bar code scanner at the same time). The scanner came with a special bar code font. I made ID cards that have a unique ID on them wriiten in that special font. In the database I have a table that has Contact Info for each person. One column in this table has the corresponding unique ID listed. When I scan the barcode the scanner acts as a keyboard and translates the text from barcode and types the unique ID from the card into a text box in a form and it presses enter. So what I need is some code that uses an onEnter event to search the table for the matching unique ID. Once it is found I need to check a checkbox in an attendance column indicating that, that person attended the meeting and scanned his/her barcode. So to make things clear I will explain the process step by step.

1. Barcode is scanned data is translated
2. Data is automatically typed into a textbox. The scanner also hits enter to send the data.
3. code searches the unique ID column for a entry that matches the unique Id that was scanned and entered into the textbox.
4. A checkbox in the same record is checked indicating that person attended.
I also need a button that will do the same with the data in the textbox when clicked.


Anyhelp will be greatly appreciated!
 
jw,

Nice to have toys, huh?

You can make an "unbound" textbox. Call it txtSearch. It has NO ControlSource.
You can use it's AfterUpdate event to use a DLookUp function to retrieve info.
You can invoke a query to retrieve ALL the related info.
You can use DoCmd.RunSQL to insert an attendance record.

Don't understand there being "a checkbox" in the person's record.

Need specific info. You can post your db, since the input can also
come from the keyboard.

Wayne
 
help with forms and onEnter Code

With the checkbox i mean it will be a yes no field. It will be marked yes when the card is scanned and it will be no on default. You will be able to see it better in the sample database. When you open the database just open the takeAttendance form and I have inserted a message that will explain it, ANyhelp would be greatly Aprreciated.

Here is the link to the DB if the link doesn't work just paste the link onto your address bar. I am hosting it on yahoo geocities and they don't like you just using them to store files. So just paste the link into your browser.Link to Database
Address: http://www.geocities.com/jwbrickner87/test.mdb
 
Last edited:
jw,

Get your query in design view. In the criteria for the Unique ID field put:

=Forms![TakeAttendance]![txtSearch]

Back on your form, use the AfterUpdate event of txtSearch (the barcode field),
to put:

Me.Requery
Me.[Service 08/04] = True

A couple points. I "hard-coded" the assignment of 8/04 because your tables
are a little off. You don't want to add another FIELD for each meeting,
you want to add a new RECORD.

With this method, you will run into a lot of difficulties when you do
any reports or analysis.

You can use the mechanics of above, but what I think that you need is
when you start a session, specify a date. Then when each person scans
into the DB, you can do:

Code:
DoCmd.RunSQL "Insert Into AttendanceTable (UniqueID, MeetingDate) "
             "Values '" & Me.txtSearch & "', #" & Me.txtMeetingDate & "#)"

You can also display their record, but the key thing is to make an
entry like that in a table.

It should be about that easy.

Wayne
 

Users who are viewing this thread

Back
Top Bottom