I'm looking for way of "auto-populating" text boxes based on a combo box selection, but with a twist.
I have two forms (in Access 2000): frmCompany, frmContact. In frmContact, there is a combo box (cboCompanyID) that displays the Company ID (autonumber). After selecting a Company ID, other text boxes are "filled" in for: Company name, street, city, etc.
This is easy to do with the column.property or DLookUp.
What I want to be able to do is edit the text boxes after they have been "filled". The reason for this is that a lot of contacts will have the same address except for the addition of: Room xxx, Floor xxx, Bldg xxx, or whatever. (This usually occurs with government addresses). Another reason is to save on typing, since the information is already copied, all I have to do is add the extra info.
One idea is to use a checkbox that says "use same address as Company listing". yes means use the company address from tblCompany, or no, let the text box be editable and saveable to the table. I just don't know how to make a text box editable with an expression as the control source.
Another idea is to have an alternate address listing. A checkbox to show which address to use: the main or the alternate. But with the alternate, I still would like the address information to be copied to the alternate address text boxes.
Any tips, codes, redesign of the table relationship, or info on what to look for in help/VBA will be greatly appreciated.
Mike
I have two forms (in Access 2000): frmCompany, frmContact. In frmContact, there is a combo box (cboCompanyID) that displays the Company ID (autonumber). After selecting a Company ID, other text boxes are "filled" in for: Company name, street, city, etc.
This is easy to do with the column.property or DLookUp.
What I want to be able to do is edit the text boxes after they have been "filled". The reason for this is that a lot of contacts will have the same address except for the addition of: Room xxx, Floor xxx, Bldg xxx, or whatever. (This usually occurs with government addresses). Another reason is to save on typing, since the information is already copied, all I have to do is add the extra info.
One idea is to use a checkbox that says "use same address as Company listing". yes means use the company address from tblCompany, or no, let the text box be editable and saveable to the table. I just don't know how to make a text box editable with an expression as the control source.
Another idea is to have an alternate address listing. A checkbox to show which address to use: the main or the alternate. But with the alternate, I still would like the address information to be copied to the alternate address text boxes.
Any tips, codes, redesign of the table relationship, or info on what to look for in help/VBA will be greatly appreciated.
Mike