Form-Subform with 5 or so records added

ggreg

Registered User.
Local time
Today, 13:03
Joined
Aug 12, 2002
Messages
66
I have a form and a subform, the subform has a couple of fields.
One of the fields in the subform is a combobox. The combobox
is called cboletter.....The combobox has A,B,C,D,E,F,G,H,I

When a new record is started in the main form I need the
subform to start 5 records A,B,C,H,I

How do I code the above and where do I place the code in
the form or subform?

Now a part two question, how can I insert a record D later
and put the D between C and H....how can I using a button code
up the button to move the records down one.

My data is not letters so I can not do it by sorting, I used letters
here to make it easier to see what I am trying to do.

thanks in Advance
 
When adding new records to your main form run a series of append queries to feed your subform and requery your subform. Tada your "default" data is there....

To do something about the order... You will have to use order by, however on a hidden field called something like MyOrder.
If you want to switch 2 lines switch the values in the MyOrder field and Presto! order changed.

Regards

The Mailman
 
Thanks Mailman!


Working thru it now, took me awhile to think about how to
do it but once you said use an append.....that put me back on
track.....It will take both append and update queries to do it....


Still would like to know if anyone has code for doing and insert....
I had already thought about adding a field and using numbers
to resort and I might have to use it if I can not find a way to
insert in the sub form.
 

Users who are viewing this thread

Back
Top Bottom