A
amjjam
Hi,
I have a contacts form which is a subform of a company form. If the
contact’s information is the same as the company information, one can usually
fill in the form field by simply clicking on it. If, for example, the
contact’s fax number is the same as the company’s fax number the code for the
on click event procedure reads:
Private Sub ContactFaxNumber_Click()
Me!ContactFaxNumber = Me.Parent!CoFaxNumber
End Sub
I have put the following similar code in the State field:
Private Sub ContactStateNameID_Click()
Me!ContactStateNameID = Me.Parent!CompanyStateNameID
End Sub
The form has a combo box of state name abbreviations. The on click doesn’t
work for the combo box. In addition, I’d like for it to have a default value
of MO. Entering [ContactStateNameID].ItemData(24) doesn’t work, as the field
remains blank; the drop down box does, however let one choose MO. The row
source type is set to Table/Query. The row source is set to SELECT [Company
State Names].CompanyStateNameID, [Company State Names].StateNameAbbreviation
FROM [Company State Names]; with a column count of 2 and 1 bound column.
Could anyone tell me how to fix this? Do I need to remove the combo box
function from the state field to have the on click event work OR choose to
keep the combo box, fix the default value, and simply get rid of the on click
event? Can both work simultaneously with a default value of MO? Thanks for
any help, amjjam
I have a contacts form which is a subform of a company form. If the
contact’s information is the same as the company information, one can usually
fill in the form field by simply clicking on it. If, for example, the
contact’s fax number is the same as the company’s fax number the code for the
on click event procedure reads:
Private Sub ContactFaxNumber_Click()
Me!ContactFaxNumber = Me.Parent!CoFaxNumber
End Sub
I have put the following similar code in the State field:
Private Sub ContactStateNameID_Click()
Me!ContactStateNameID = Me.Parent!CompanyStateNameID
End Sub
The form has a combo box of state name abbreviations. The on click doesn’t
work for the combo box. In addition, I’d like for it to have a default value
of MO. Entering [ContactStateNameID].ItemData(24) doesn’t work, as the field
remains blank; the drop down box does, however let one choose MO. The row
source type is set to Table/Query. The row source is set to SELECT [Company
State Names].CompanyStateNameID, [Company State Names].StateNameAbbreviation
FROM [Company State Names]; with a column count of 2 and 1 bound column.
Could anyone tell me how to fix this? Do I need to remove the combo box
function from the state field to have the on click event work OR choose to
keep the combo box, fix the default value, and simply get rid of the on click
event? Can both work simultaneously with a default value of MO? Thanks for
any help, amjjam