Combo Box Linked To Other Fields

Jkittle

Registered User.
Local time
Today, 11:10
Joined
Sep 25, 2007
Messages
100
Is there a way to link a combo box to other fields?

I have a form that data is entered into and I want to have a default value place in a field based on a selection made in a combo box. Example:

Combo box choices: "Owner Reservation", "VBRO Reservation", and "Dunes"

I want my one of my form field “Reservation Fee" to equal $40 when "Dunes" is selected in the combo box and save the "$40" into my table for reports later.
 
combo box link

You can use the after update event of the combo box to populate the default field.
Just put this code in the after update event

me!YourDefaultField = me!cboYourCombobox.Column(The Column No)

Note Combo box column counts start from zero
cheers
 
Sorry but I'm still confused. I understand going into properties and putting in me!Reservation Fee=

But I do not understand the me!cboYourCombobox.Column(The Column No)

The combo box list choices based on a query.
 
Why would you want to set the Default for the Reservation Fee field based on the combobox selection for a single record?

As stated, you need to use the AfterUpdate event for the cbo.

Code:
Private Sub YourCombo_AfterUpdate()
 Select Case YourCombo
   Case "Owner Reservation"
        'code for this choice
   Case "VBRO Reservation"
        'code for this choice
   Case "Dunes"
        Me.[Reservation Fee] = 40
End Select

Notice that because your textbox/field has a space in its name, you have to put square brackets around it.
 
The answer to why, is when the property is rented by one of management companies they charge a fee, the other two possible renting people/company do not charge a fee, so I just wanted the fee to auto populate when the rented by "Dunes" was selected.

Save me a little typing (lazy I guess)
 
The "why" was addressed to coyote! I understand why you need this done. The code I gave will work fine.
 
missinglinq,

Thank you for your help, your code worked great!
 

Users who are viewing this thread

Back
Top Bottom