Volunteer Database Question

Buckethead

New member
Local time
Today, 23:59
Joined
Apr 10, 2012
Messages
4
Hi there
I am designing a database for a charity that utilises volunteers for various jobs at various times. The Access form looks very similar to a paper form returned by the prospective volunteers.
Part of the form asks the question: "how do you wish to be contacted?" and the access form has a drop-down list, which are: telephone, fax, email, visit and post. These values come from another table called 'lookup2'.
Next is a drop-down list of times from 8 am to 6 pm in 30 minute increments. These times come from another table called 'lookup1' which has the vales (times) referred to above in it.

How do I go about doing this so that if the 'telephone' and 'visit' values are selected, the times are displayed, but if 'post', 'fax' and 'email' values are selected, the times are not displayed?
Is this possible? I'm very new to access and I don't know VBA.
Any help would be appreciated.

Glenn.
 
I would consider doing two things.
1. Put some code in the On Click event (or On Enter) of each Control that checks if the controls prior have been updated.
This would be simple - some air code
Code:
If Me.controlname & "" = "" Then
MsgBox "You must enter data in what ever... first"
Exit Sub
End If
This would ensure the data is entered in the correct order. Add some labels and group control with Boxes etc.
2. Use a query/sql as the Conrol Source and this will ensure the correct options are available depending on the data selected in the previous controls.
You could do this with one query or you could have code that decided on which query would be used given the choices made in earlier combo box controls.
 
There is a data model for Charities and Appeals here
http://www.databaseanswers.org/data_models/charities/index.htm

It may be overkill for your need, but it may be a source of ideas for your database.

As for your question re Telephone or Visit, I can see some vba code with logic along this line:
(you would include these with Events on the Form)

If Selection = "Telephone" OR
Selection = "Visit" then
' capture and store the appropriate time
-present a list of choices for available times
-validate and store the choice
Else
End If
 

Users who are viewing this thread

Back
Top Bottom