Hi Jeanette,
This is a new form similar to the one which had
three combos instead it has only one combo. The reason I'm using this
form is that the previous form selected a group of records based on the
criteria in the combo box. This new form selects particular records one
by one.For example if the previous form selected all the records
satisfying the criteria of COMPANY lets say with the initials "IMH"
between the dates 3-5-07 and 10-5-07 it might return to me 10 records.
Because there are instances that the 10 records returned might have a
different charge to them I might only want to include only 4 records. The
form which picks specific records allows me to pick certain records I
choose. That is why it is based on the field RESNAME which means by
reservation name, which there can only be one record at a time.
Now the first subform picks the record I need and by running an Append
Query I copy that record to a table which temporarily stores the record.
I then select another record from the first subform and that again stores
in that table. That Table is my second subform which shows as I go along
show all the records I pick one at a time until I am ready to print it
out the whole lot of them. I may say here I have a code which every time
I open the main form the records in the temporary table are deleted so I
can start again.
So all I want is to see in my second subform the records as I go along.
I hope I have cleared it up.
Thanks Jeanette
Ange
Jeanette Cunningham said:
Ange,
I went back and looked over our other thread to remind me of how your
form
is setup.
Main form has 3 combos, user makes their selection and the 1st subform
shows the records that match the selection.
Please tell me again why you need a second subform?
Is it showing a different set of records from the 1st subform?
If yes, explain to me the difference between the records shown in the
1st subform and the ones you want to see in the 2nd subform.
Jeanette Cunningham
Hi Jeanette,
The Combo is on the Main Form.
The qACCOUNTS SELECTION is a separate subform on the main form.
Hope I have clarified.
Thanks
Ange
Ange,
there are 3 forms open, 2 as subforms.
Where is the combo with the after update code Me![qACCOUNTS SELECTION
subform].Visible = True? Is it on the main form or the 1st subform?
Is the qACCOUNTS SELECTION subform part of the 1st subform or is it
just
a
separate subform on the same main form?
Jeanette Cunningham
Hi Jeannette,
What I did was initially have the subform Not
Visible and with the after Update from the Combo Box placed it
visible:
Me![qACCOUNTS SELECTION subform].Visible = True
but it does not work only when I go to design view and then back to
form
view do the desired results appear in the second subform!!
Still think I might need some sort of refresh or open close command.
Thanks
Ange
Thanks Jeanette I understand the skeptic behind your proceedure, it
woks,
just one more question if you don't mind, what code would I use so I
can
incorporate it in my automations. By the way you have been a great
help,
and my program is starting to work fine !!
Thanks
Ange
message
Instead of running an append query, save your selections in a
query.
For an example I will call the query qAccountSelections.
The second subfom's data source will be qAccountSelections
Hide the second subform until you have finished making all the
selections, then make it visible.
The report's data source will also be qAccountSelections
Jeanette Cunningham
Hi,
This could be a tricky one.
What I've done is created a Form named ACCOUNTS SELECT which has a
control being a Comb Box named 'PICK RESNAME' and an embedded
subform
which returns all the records according to the particular data
from
the
'PICK RESNAME' Combo Box.
Thats all fine and well !
But what I need is to pick specific records and to store them in a
let's say temporary Table which I will print out via a Report. For
this
temporary table, I have created in the Form ACCOUNTS SELECT
another
Subform which I hoped will view all the selections I have made
previously. In order for me to store the selections I have made a
Query
Append which runs everytime I make a selection with the Combo Box.
The problem is the Second Subform does not view the added on
selections
unless I exit and enter the Form again. Maybe I can use some sort
of
Refresh code?
Thanks
Ange