Have looked for an answer using all my resources and can't seem to find an answer to this one. I'll try to explain clearly...
I have a main form ("Form 1") with a subform ("Form 2"). The form 2 has a subform ("Form 3"). The purpose of these forms is to create a customer PO. Form 1's recordsouce is the main PO table. Form 2's recordsource is a query that pulls info from a set of quote tables for informational purposes only. Form 3's recordsource is a shipping addresses table that could hold more than one address per customer. There is a "default" field that indicates whether an address is the default for a customer and a record id field that is autonumber. So...
When the Form 1 is opened, it is opened to a specific customer (based upon a selection made in unmentioned "form 4"). The default address for the customer is shown in "Form 3". This is achieved by setting a where clause in the recordsource to default = yes. "Form 1" has a record id field that is set to the value of the record id field in "Form 3". All is good so far. Still with me?
The problem I have is this: If a user wants to change the address for the PO from the default, they press a button on Form 3 and another form opens (form 5 who's recordsource is the same table as form 3's) with all the addresses for that customer in form view. I want the user to then be able to assign a new address to the po by finding the correct address in form 3 and clicking a button that says "Apply address to PO". I tried to do this by assigning the recid id in form 3 to that of the chosen record id in form 5 when the button is clicked, but I am getting error 2448 "can't assign a value...". I am completely out of ideas on what I should do. Any ideas?
I have a main form ("Form 1") with a subform ("Form 2"). The form 2 has a subform ("Form 3"). The purpose of these forms is to create a customer PO. Form 1's recordsouce is the main PO table. Form 2's recordsource is a query that pulls info from a set of quote tables for informational purposes only. Form 3's recordsource is a shipping addresses table that could hold more than one address per customer. There is a "default" field that indicates whether an address is the default for a customer and a record id field that is autonumber. So...
When the Form 1 is opened, it is opened to a specific customer (based upon a selection made in unmentioned "form 4"). The default address for the customer is shown in "Form 3". This is achieved by setting a where clause in the recordsource to default = yes. "Form 1" has a record id field that is set to the value of the record id field in "Form 3". All is good so far. Still with me?
The problem I have is this: If a user wants to change the address for the PO from the default, they press a button on Form 3 and another form opens (form 5 who's recordsource is the same table as form 3's) with all the addresses for that customer in form view. I want the user to then be able to assign a new address to the po by finding the correct address in form 3 and clicking a button that says "Apply address to PO". I tried to do this by assigning the recid id in form 3 to that of the chosen record id in form 5 when the button is clicked, but I am getting error 2448 "can't assign a value...". I am completely out of ideas on what I should do. Any ideas?