Pop up update

karthikcoep

Registered User.
Local time
Tomorrow, 03:40
Joined
Mar 4, 2009
Messages
40
I have created a multiple items form.
There are three fields in the form.
Sr No-Textbox-Primary key
Geometry-Combobox
Factor-combobox

I want to acheive the following.

When the user selects one of the following geometries,
Square
Rectangle
Triangle
Circle.

A pop-up dialog should open up, asking for values like length of side, radius of circle, base of triangle etc.

The user will enter the data.
When he saves the data,
The pop-up box should disappear and
then the user will select the factor.
The vaule entered in the pop up dialog should be stored in the same record as that of the primary key (Sr no).

How to achieve this.

Also how to calculate area on the basis of the data entered.
 
How about using the same form but set enabled to false or visible to false for where the fields that accept the values like length of side, radius of circle, base of triangle are not required for the Geometries selection.

Introducing another form means more work.
 
I agree, I would have additional hidden fields, like length1, length2, . . . radius, etc.

For the combo box update event procedure have a select statement

for each case, square, rectangle, circle, etc. make the neccessary parameter fields visible. Then before doing whatever your form does, have some validation code to make sure all the parameters get entered.

If you must have a pop-up, create a new form also containing the neccessare parameters, and be sure to open it with
DoCmd.OpenForm "FormName", , , , , acDialog
so that it will take focus and wait for input, then close when finished.
You then would have to have each field in the pop-up set the values of the corresponding hidden fields on the main form. It really is a lot more work.
 

Users who are viewing this thread

Back
Top Bottom