HEEEELP! Combo Box Help (1 Viewer)

alguzman

Registered User.
Local time
Today, 19:21
Joined
Aug 2, 2001
Messages
63
I have a form with a combo box that shows member types and member dues. Once a choice is made only the member types shows and that's what I want. The next thing I want and need help in is when the member type is chosen I would like for the dues, which is a currency feild, for that member type to automaticlly fill another text box that says Dues owed. Does anyone have the code or any other way to do this.
Al
 

shacket

Registered User.
Local time
Today, 19:21
Joined
Dec 19, 2000
Messages
218
There are a couple of ways to do this (This same type of question has been posed a lot around here lately!):

1. Use a subform based on the combo box
2. In the AfterUpdate eventof the combo box, put the following code:
Me.txtDuesOwed = Me.cboMemberType.Column(2)

(Remember - columns are zero-based, so the '2' above would actually refer to the third column)
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:21
Joined
Feb 19, 2002
Messages
43,334
You need to include the dues amount in the query used as the rowsource for the combo box. Then replace the question mark in the following statement with the column number -1 of the dues amount. So, if the dues amount is column 2, the question mark would be replaced with a 1.

Me.txtDuesOwed = Me.cboMemberType.Column(?)

The combobox columns are a 0 based array. That means the first entry is 0, the second is 1, the third is 2, etc.
 

Users who are viewing this thread

Top Bottom