Creating Form with Multiple Entries

lemo

Registered User.
Local time
Today, 17:55
Joined
Apr 30, 2008
Messages
187
hi.
i am new to Forms, so was having problems with this probably very simple one. please see attached.

basically, i need the user to enter the date, and then for each Park - the attendance. then hit the button or enter - and there will be five new rows in the attendance table.

any help would be thoroughly appreciated.
thanks,
len
 

Attachments

  • test.JPG
    test.JPG
    36 KB · Views: 701
hi.
i am new to Forms, so was having problems with this probably very simple one. please see attached.

basically, i need the user to enter the date, and then for each Park - the attendance. then hit the button or enter - and there will be five new rows in the attendance table.

any help would be thoroughly appreciated.
thanks,
len


Lemo if your form is based on the Table which holds the data there isn't an issue as it already will save the data to the fields.

Is the form bound to the table or is it an unbound form?

If the later then all you will need is some code to add new based on the object (textbox) names
 
it is bound to the table. i think. i make it (in Access 2007, btw) by selecting the table of interest and then hitting 'create - form (or 'multiple items')' in the ribbon.

the problem is that i want something between single entry and multiple entry form, and it's not happening.

thanks Trevor.
 
Are you ALWAYS going to use those same five parks and ONLY those? If so, you can simplify things by logging each lot of attendances as one record, not five separate ones. So your fields would be: AttendanceDate and five "number" fields called
Central
Prospect
PelhamBay
FreshKills
FlushingMeadows

Then you enter the date, enter the five numbers and when you navigate to the next record i.e. the next date, all five values are stored. No need for an Add button at all.

If your requirement is different, there will be better approaches.
 
it's not guaranteed that i am going to have ONLY those five, it may change at some point.

i'd prefer the resulting table to have 3 fields - Date1, Park, Attendance (but please correct me if you think it's not the best approach).

i played with this some more yesterday, and - complete blank! am i just overthinking this? or should i buy a thick access 2007 book? i tried a few help sites/msoffice help, all in vain.. really at a loss here..

thanks.
l
 
OK...the way I would approach this is to have the three fields you suggest on the form, but to have a CONTINUOUS form. I think Access calls this a muliple item forms now in Access 2007.

So you will eventually build up a long list of records, each row having date, park and attendance number.

But instead of having to enter the same date five times (which I think is what prompted you along the lines of your screenshot), I created a new field at the top of the form, where you enter the date once. Then each time you enter a new record it picks up that date automatically.

So, on day one, you select the date, then enter as many attendance numbers as you want. Day two, come back and change that date at the top and then enter five more parks. I made the Park field a combo-box (dropdown option), based on a separate table where I entered your five options. If you ever need to add new parks to your list, just add them to that table and they'll show up in the combo-box.

When you unzip and open this, open the form in design view and you'll see where I've explained what I've done. Hopefully this will be enough to get you on your way.

Should you buy a thick Access book? Hmm... maybe! I've been where you are and I know how frustrating it is when you don't have some of the basics.
But you can learn a lot online and there is a WEALTH of experience on this forum. I learned just about everything I know (which isn't a great deal) right here and I keep coming back for more.

Let me know how you get on with this. Good luck!

Pat.
 

Attachments

thank you so much, Big Pat!

will play with the design in the next few days, will report on the progress - looks like it needs a little tweaking.

this forum is pure blessing - i learned so much about queries here, it's like going to college, only better, in many ways.

l
 
i feel like i am nagging at this point, but i still can't figure out this form.
Big Pat, your form from the 'attendances' database is perfect, it's exactly how i want it to look. but it doesn't change the dates in the rows when you change it up top, and it doesn't append the new attendance records to the attendance table.
i changed the code from

Private Sub Park_AfterUpdate()
Me.AttendanceDate.Value = Me.TopDate.Value
End Sub

to

Private Sub TopDate_AfterUpdate()
Me.AttendanceDate.Value = Me.TopDate.Value
End Sub

now it changes the date below only in the row where my cursor was prior to going to topdate. which is a mystery to me..

would sincerely appreciate any help.
thanks a much.
l
 

Users who are viewing this thread

Back
Top Bottom