I inherited a database (as a novice at Access) and need to modify it to
make it more efficient, i.e., the assignment form needs to autopopulate
with the client's name, address, phone number, etc., when you select
the cust id. Found this cited as a good method:
http://www.mvps.org/access/forms/frm0058.htm
I have two tables (clients, assignments) and one form (assignment
input) in the database. I have a
control box called CUST ID in the assignment input form. I set the row
source type to table/query. I set the row source to the following:
SELECT Clients.CustomerID, Clients.Contact FROM Clients ORDER BY
CustomerID;
I then set the control source of the textbox (it was previously a combo
box with a drop down menu)to:
=[CUST ID].Column(1)
This results in the name of the client (contact) autopopulating when I
select the customer id. However, when I try to save the form I get this
error message: The field 'Assignment Data Sheet.Rec'd From' cannot
contain a Null value because the Required property for this field is
set to True. Enter a value in this field.
I tried removing the required property for that field from the
assignments table (my feeble attempt at troubleshooting) and the
client's name that autopopulated in the form still does not appear in
the table. This is where I am stuck.
(Of course, I have other data that needs to autopopulate too. I just
need to make sure the method works before I add the additional code in
the row source of the CUST ID control.)