form creation help

Coleman984

Registered User.
Local time
Yesterday, 16:03
Joined
Jul 28, 2011
Messages
89
I'v been trying to get this form on my database to work on my own. And well I've not having much luck. I basically want to start with two pages (subforms in said pages). One to show the employees errors, and one to show the employees zone. Both are a per day thing. Meaning if an employee made an error today 9/2/11, I would enter the the date and error type on the page titled Errors, and on the page titled zones I would enter the date and Zone the driver was in.

I think the database structure is correct; though I am not certain. If anyone is kind enough to take the time to help me with this I would ask that a plain English explanation be given for what was done to get this form to work. I've tried making queries to put in the subforms, I've gotten close a couple of times but the best I've done is having the subform display the correct information but more than once per entry.

Anyway I hope that was coherent. I've attached the database. I really want to learn this stuff but I'm having trouble wrapping my mind around access logic. I've read several things and I'm closer now than before to understanding this program but not yet to the point where I can get these things done on my own.
 

Attachments

I got the combo box and everything to work but I get an error message now when I try to add a new entry. Tells me that I can't add a new entry because a missing record required from a tbl. Gah, just can't win.
 

Attachments

Okay, here's the rundown as to what is wrong.

1. You had an extra subform in between frmForklift and qryErrors subform which was extraneous and therefore there was a disconnect between the two forms. You don't need frmErrs as part of that setup.

2. Your query for the subform is wrong and should not have had the tblErrorTypes in it. I've fixed the query and the form.

3. You needed to add the field for ZoneID in there as well as removing Referential Integrity from the link between that table and the main table. If you are always wanting it filled in, you can leave the R.I. set but if you need to have it optional then R.I. shouldn't be checked for that one.

4. I changed the Error Type combo to use the proper row source and be bound to the correct field (fkErrIdNo) - the column count and column widths of the combo allow the ID to be stored but the name to be displayed.

Take a look at my revised version of your database and see if you can see what I did.
 

Attachments

Thanks Bob; however Zone is required. How do I make that field required on the form? Thanks for the explanations and the assistance.
 
Thanks Bob; however Zone is required. How do I make that field required on the form? Thanks for the explanations and the assistance.

Then leave the R.I. set on that link for that field in the Relationships. But you can also use the subform's Before Update event to require the value be set:

Code:
If Len(Me.fkZoneID & vbNullString) = 0 Then
   Cancel = True
   Msgbox "Zone is required, please fill it in.", vbExclamation, "Entry Error"
End If
 
Thanks for that tip bob. That looks like it will be all kinds of useful, the before event code.
 
Just realized that I needed more information to be collected for these errors. Pallet Tag # and Pallet Tag Location; 2 tables for Location and 1 for Number (I think). Pallet Physical Location, Pallet System Location, Pallet Tag # I'm having trouble being able to enter info into the form. Not sure how to update the query I know i'm not doing something correctly but I am not sure what that is. I've attached the DB with what I think I should be doing; just not sure where to go from there. These new pieces of information are not required.
 

Attachments

Users who are viewing this thread

Back
Top Bottom