G
Guest
Hi everybody, I'm having a problem and thought that you guys can help me out
In a form, called Form1, to register the Products I have 3 fields: Name of the product, Unit (you select it from a List) and Category. This form also have a button to launch a subform to create a New Unit for this product (if needed).
When someone creates a New Unit, the Form1 must be refreshed for the new unit to be available in the List. Due to the field Unit is required in the table, you can't refresh the Form1 if that field is empty. So the user is forced to select any value, refresh and then select the value he just created.
I wanna to create a control to make this automatic. I want an event that does the following when you finish the creation of the new unit
1. Set the focus in the Form1
2. Write any value in the Unit field
3. Refresh the Form1
4. Erase the value in the Unit field (so it shows empty
5. Set the focus in the Unit field (so the user can select the new unit)
My problem is that I don't know how to do the steps 2 & 4. If any of you can help me with this one I'll be very thankful
Thanks a lot
Giancarlo
In a form, called Form1, to register the Products I have 3 fields: Name of the product, Unit (you select it from a List) and Category. This form also have a button to launch a subform to create a New Unit for this product (if needed).
When someone creates a New Unit, the Form1 must be refreshed for the new unit to be available in the List. Due to the field Unit is required in the table, you can't refresh the Form1 if that field is empty. So the user is forced to select any value, refresh and then select the value he just created.
I wanna to create a control to make this automatic. I want an event that does the following when you finish the creation of the new unit
1. Set the focus in the Form1
2. Write any value in the Unit field
3. Refresh the Form1
4. Erase the value in the Unit field (so it shows empty
5. Set the focus in the Unit field (so the user can select the new unit)
My problem is that I don't know how to do the steps 2 & 4. If any of you can help me with this one I'll be very thankful
Thanks a lot
Giancarlo