linking 2 querys in vba

  • Thread starter Thread starter chad
  • Start date Start date
C

chad

not for sure if i am asking the right question for what i
am trying to do, but here goes.

i added a subform to my main form, my main form is an
unbound form that all the info on the form is processed
through vb. i can't seem to figure out how to link my new
subform into the code so that when i save the data on the
main for it will also save the info on subform into a
diffrent table. and when i open up the info on the main
form i need it to open the info on the subform as well.
if you need to see what i am trying to do ask me and i
will put my database on my server for you all to look at
to get a better understanding of what i am trying to
accomplish.

thanks and sorry for so many post i am trying to learn vb
and access it is going slower than what i thought it
would.

Thanks again for all your alls help.
chad
 
From what I'm reading, I think you are going about this to long way. Why not
just have the main form connection to the table or query and have the
subform connect to the table where you plan to save the subform data. As
long as there is a relationship between both tables, linking them together
should pose no problems. IF you don't want the user to see any previous data
from both tables set the data entry to Yes. You could also make a copy of
the form and use one for editing only.
 
As the other poster suggests, Access really works best with bound forms.
Using VB coding to retrieve data to display, then store it back to the
table, is possible in Access, but it's sort of like re-inventing the wheel,
since Access does this so well natively.

I'm also a bit unclear about why you are using a subform at all.

Perhaps you could explain some more of your intentions?

- Turtle
 
Back
Top