Opening a form with a Default set of values in a subform

hansnyc

Registered User.
Local time
Today, 15:01
Joined
Apr 12, 2007
Messages
50
Here is my sample DBA

I'd like to solve this issue

when I open my Quotations form I'd like a set of services to be selected by default, ex: Brush and Pen. So the user only has to input the quote amount

is there anyway to have the form open with a script like:
"on open (or on load). in subform SELECT refproduct where product from tblproducts = 1 and also SELECT refproduct where product from tblproducts = 4"
Therefore when my main form opens, in the subform I have already Brush on the 1st line selected and pen on the 2nd. My user only has to type the price.

Thanks for your much appreciated help
 

Attachments

use doCMD.Applyfilter in the forms on open event
 
use doCMD.Applyfilter in the forms on open event

Dennisk - I think you misunderstand what he wants. He wants to add 2 new default records to the subform for every new main record. So, when he adds a new record in the main form, automatically a new record (say paint) is added and then another record (say pencil) is added also. Then, the user only has to go back and enter the number of each instead of selecting the paint/pencil combos to add them AND the quantity, but only the quantity. I think it's totally possible to do, but there's too much for me to work out for the time I have available.
 
When I set up a sub form embedded in a main form I have the sub form disabled until a record in the main form is selected. also when a new record is added (using a 'new' button) the sub form is disabled (so you cannot add records in the sub form until a main record is present. When input is complete the user has to click a save button to enable the sub form. This save button is where I would automatically generate records in the sub form.

I used this technique many years ago to populate a sub form with all the specialties in a hospital (100s) in a sub form linked to a Contract Number.
 
Thanks for your reply
My thing is that from the switchboard, the user will ultimately select the type of quotations he'd like to make
Quotation A will open a form which is from the Table tblQuotation but in is subform a selected list of services is pre selected, so the user just put quantity and price.
Quotation B will have the same thing but different services displayed in the subform.
I therefore need to code cmd button on my switchboard to open the form with different services.
Can you help?

When I set up a sub form embedded in a main form I have the sub form disabled until a record in the main form is selected. also when a new record is added (using a 'new' button) the sub form is disabled (so you cannot add records in the sub form until a main record is present. When input is complete the user has to click a save button to enable the sub form. This save button is where I would automatically generate records in the sub form.

I used this technique many years ago to populate a sub form with all the specialties in a hospital (100s) in a sub form linked to a Contract Number.
 

Users who are viewing this thread

Back
Top Bottom