Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop down menu depending on a result

Status
Not open for further replies.

Arwel

MIS
Feb 24, 2003
3
GB
Ok im doing a database in access. And ive got a drop down menu where people choose if they work Monthly or Weekly. Then i have another field, which asks on what days, so what i wanna do is if they picked Monthly i want a drop down menu of a table (that ive made) with dates from 1st -> 31st, or if they picked Weekly then a drop down of a table with Monday -> Friday. But im not sure how to do it. Ive been trying stuff out but cant get it yet
 
In the AfterUpdate event of the control where they pick weekly or monthly have some code that goes:-

If Monthly Then
cboPickWhen.RowSource = 1;2;3;4;5;6;7;8;9; etc.. ..
Else
cboPickWhen.RowSource = "Monday";"Tuesday";"Wednesday"; etc .. ..
End If
cboPickWhen.Requery
cboPickWhen.DropDown
cboPickWhen.SetFocus



'ope-that-'elps

G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.
 
Ok so say if ive got a field called "How Often" and this is were you pick Monthly or Weekly. Now what do i create a new field, combo box or what? Sorry im a bit of a noob
 
its allright, ive got it too work, thanx very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top