Update form to 2nd form record

amerfeld

Registered User.
Local time
Today, 13:21
Joined
Aug 17, 2004
Messages
58
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?
 
Dumbe question here, why not just make the RecID of Form3 a combo box and they can just pull down and select any time they want. That is the simplist way I can think of, but of course there a couple of search pop-ups that you could add to make it more fancy. hth.
 
Thanks for your response. I had thought of that, but also trying to give user ability to enter new addresses if needed. However, perhaps I should make that part a separate entity. Curious what the search pop ups your refer to are. I appreciate your input/help.
 
That is what I do. You can also add a cmdButton for new customers right on the form if you like. I just started using the searches and they work great for finding part no and customer no and names and the like. It is just another form, but you can find and set a lotof this with it also. hth.
 

Users who are viewing this thread

Back
Top Bottom