Popup Form Open/Update Issue

BrentG

Registered User.
Local time
Yesterday, 23:41
Joined
Jun 29, 2006
Messages
20
Hi Guys,

I have a big issue I'm not sure on:

1. I have a combo box in my "NewOrder" form that I use to select a customer for the order. I'd like to have a button that would open my NewCustomer form if a new customer was needed.. I can do that.... but how to I make it so that the new customer I entered in that instance appears selected in my combo box??


The real issue is makeing results or entrances in "popup" forms show on the main form.


2. In addition, is there any way that I can change an atttribute of an order and have that attribute applied automatically to each of the LineItems? (For instance If I had two service contracts on one order, the order and both contracts are ACTIVE. If I were to change the order to INACTIVE, is there any way to put somthing in the AfterUpdate event of that field that updates the same fields in the LineItems table.. without having those fields actually on the form)??


Really stuck... any help would be greatly appreciated.
 
Last edited:
For question 1, you can use the requery method on your combo box. This could be triggered by the GotFocus event of the main form, so when you have completed entering your new customer information and the main form gets the focus back, the combo box can be requeried and will display the new cusotmer.

For question 2, there are two ways: difficult way would be to trigger some code which would include an SQL Update statement to update the necessary fields within your other table.

The easy way would be to include the fields on your form but make them not visible if you don't want people to see them. Then simply change the values using the AfterUpdate event.

I often have several hidden fields on my forms for such purposes (little tip, I always setthe background colour to red for hidden fields, then, when I am in desing mode I always know instantly if a field is supposed to be hidden or not).
 

Users who are viewing this thread

Back
Top Bottom