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!

Default control value from query 1

Status
Not open for further replies.

claims

Technical User
Feb 8, 2005
6
US
I have a MS Access form (frmEntry)with three fields that I want updated based on the value of one field:

FieldA (drop-down list from query with columns A-Autonumber, B-Text String, C-Different Text String, D-Another Different Text String) this field is bound to "A", but column widths are set to display "B"

FieldB (text) I want to display and store the value in this control from column "C" as chosen for FieldA. Stored, but not able to be edited from the form.

FieldC (text) The same as FieldB, but able to edit the defaulted value.

The user should be able to simply chose from the drop-down list for FieldA so that FieldB & FieldC default, with FieldC able to be edited.

Please help!
Thanks
 
In the AfterUpdate event procedure of FieldA:
Me!FieldB.Locked = False
Me!FieldB.Value = Me!FieldA.Column(2)
Me!FieldB.Locked = True
Me!FieldC.Value = Me!FieldA.Column(2)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top