Let me preface: I'm a novice, and have no programming experience.
I have created an access database and have a few tables in it. I have
created a form called "clients" This form opens up and has alot of
basic client information in it, nothing fancy, no code (other than what
access has put in).
I have created a second form "newVisit" This form has a subform on it
called "client visit subform". The form is just to be used to record
new visit information into a table called "visits". The client info
though is contained in a table called "clients". I have both tables
linked to one another in a one-many relationship via ClientID (primary
key in Clients) which is an autonumber.
Here's my problem: I added a command button to open "newVisit" on the
"clients" form. Which works fine. But I can't get it to open and
populate the fields on the "newVisit" form with the client info from
the "clients" form. I've searched and found some code that does it,
but when I add that code, then the "client visit subform" on the
"newVisit" form ignores the data entry mode that I have set it to. So
I can get the form to open the second form via the command button to
the recordset of the client I am working on, but when I do, the
"newVisit" subform "client visit subform" allows the users to scroll
through visit information for that recordset, which is not what I want
to happen, I want it to be data entry on that subform.
Am I going about the design of the forms wrong? Is there a better way
to pass the record information from one form to another that doesn't
bypass my data entry ONLY needs on that second form?
Any help is appreciated.