Registering a member to an event

M

mscwd

I am currently creating an Access database for a school project but I am
having trouble.

Basically I have an Access database which comprises of a "member database"
an "event database" and an area where you can "register members to the
events".

I want to have one form where you can register members to any event held in
the event database. I'll explain briefly what I am trying to achieve. (you
can refer to the screenshot which should be of some help)

1. You would select the event you wish to register a member on from the
'select event' drop down list at the top. (The drop down list is a look up
list which comprises of the autonumber of the events held in the "events"
database.)

2. Below this is an area on the form which provides an 'overview' of the
event you just selected from the drop down list, this area will update
depending on what event you selected in the list.

3. Next you would select the member you want to register from the 'select
member' drop down list (the drop down list is again another lookup list of
members autonumbers from the "member" database).

4. You would click the 'register' button and the selected member from the
drop down list would be "registered" of transferred to the table in the
subform below.

Note: multiple members would need to be added to the same events
registration table and likewise there will be multiple event registration
tables you could scroll through by using the main 'event' drop down list at
the top.

The screen shot below is the form I have designed, the form doesn't function
at all at the moment. I know what I want it to do I just cant get it to do it!

example.jpg


Many thanks for your time,

-mscwd
 
S

Stephen Haley

If it were me I would structure the form as follows:-

1)Main form
Not bound to any data

2) Subform1 - Events
Bound to events query linked on EventID on sub to Events combobox value on
parent
Note you will have to insert the values manualy as wizard wont let you do
this.

3) Subform - Members To events
Bound to query linking Memebers and members to events table (ReadOnly)
Linked on eventID on sub to events combobox

4) Button and Member combo are on Mainform
Put some code behind the button to take the values for EventID and MemberID
from the two combo boxes and and a new record with those two values then
requery the member subform

Note both combo boxes data contain two cols with the first id, second name
set colums to 0,3 to hide ID

ie along the lines of
Dim rst As DAO.Recordset
Dim db As DAO.Database
Dim intValue As Integer
Dim x As Integer
Set db = CurrentDb()
Set rst = db.OpenRecordset("tblMembersToEvents")
rst.Addnew
rst("MemberID")=cbMemberID.Value
rst("EventID")=cbEvent.Value
rst.update
rst.close
me.subformMembers.form.update

Idealy you run a check to ensure that the member is not already enrolled by
using a recordsetclone of subform1

Remove record navigation & add scroll bars to sub forms

Alternatively Given you arent adding or editing events You could always make
the event combo datasource multicolumn, have the event text boxes on the
mainform and suck the data into each text box with the =cbEvent.Column(x) in
each txtbox source.

But there are many ways to skin a ....
I am sure someone will have a more elegent idea
rgds
Stephen

mscwd said:
I am currently creating an Access database for a school project but I am
having trouble.

Basically I have an Access database which comprises of a "member database"
an "event database" and an area where you can "register members to the
events".

I want to have one form where you can register members to any event held
in
the event database. I'll explain briefly what I am trying to achieve. (you
can refer to the screenshot which should be of some help)

1. You would select the event you wish to register a member on from the
'select event' drop down list at the top. (The drop down list is a look up
list which comprises of the autonumber of the events held in the "events"
database.)

2. Below this is an area on the form which provides an 'overview' of the
event you just selected from the drop down list, this area will update
depending on what event you selected in the list.

3. Next you would select the member you want to register from the 'select
member' drop down list (the drop down list is again another lookup list of
members autonumbers from the "member" database).

4. You would click the 'register' button and the selected member from the
drop down list would be "registered" of transferred to the table in the
subform below.

Note: multiple members would need to be added to the same events
registration table and likewise there will be multiple event registration
tables you could scroll through by using the main 'event' drop down list
at
the top.

The screen shot below is the form I have designed, the form doesn't
function
at all at the moment. I know what I want it to do I just cant get it to do
it!

example.jpg


Many thanks for your time,

-mscwd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top