473,395 Members | 1,670 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

passing record information from one form to another when there's a subform

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.

Aug 22 '06 #1
2 2526
Generally, subforms are for displaying data - that is, if your subform
is in datasheet view - if you have a scrollbar in the subform, then it
is in datasheet view.

Your easiest option would be to create a separate form for data entry.
So you would have one form with a subform for displaying data and a
separate form for data entry.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Aug 22 '06 #2
Rich,

That's kinda what I'm trying to do. I have the main form and I want
the users to click a button on the main form to bring up another form
to enter information into a second table (that is linked via ClientID
field)

My issue is I want the form that gets brought up when the user clicks
the button to be pre-populated with the client information of the
record they were on when they clicked the button. But I don't want
them to be able to change any of that client information or have the
ability to scroll through the "subrecords" or whatever you want to call
them that apply to that data entry form. I've tried alot of methods
but just not sure I'm grasping how to do it correctly.

I tried creating a query that had all of the user information from the
main table and the fields on the second table I want them to input data
into, but I can't get it to autopopulate that form for some reason. I
can do it in code, but when I do that the form comes up as "filtered"
so to speak and it seems to no longer be "data entry" mode.
Rich P wrote:
Generally, subforms are for displaying data - that is, if your subform
is in datasheet view - if you have a scrollbar in the subform, then it
is in datasheet view.

Your easiest option would be to create a separate form for data entry.
So you would have one form with a subform for displaying data and a
separate form for data entry.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Aug 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bob | last post by:
Hi Everybody I have a form called frmListBox that is connected to a table tblListBox. This is opened from a form called "frmInvoiceOrder" which has a subform called "zfrmInvoiceOrder" and...
0
by: misscrf | last post by:
I am currently working on a database, in 3rd normal form, which is for candidates who apply for a job with the law firm that I workd for. My issue is with good form design. I have a main...
5
by: tdmailbox | last post by:
I have a form with a child form. In the child form there is a list of names that can grow quite large. On the parent form I want to display the first name from the child form. I set up a test...
17
by: perryche | last post by:
I have 5records, e.g. Rc1, Rc2, Rc3..., when user open up a form, I want it to open to a particular record (say Rc3) then when user chooses the Record Selector , it will go to Rc2 and , it will go...
1
by: kkrizl | last post by:
I have a form that displays general information about an alarm permit location. There's a subform that shows detailed information about burglar alarms that have gone off at the location. When a...
7
by: Stephen Poley | last post by:
I have the following situation: - a table of employees, keyed on employee-id; - a table of training sessions, keyed on session-id; - a requirement to log who was present at which session, plus...
0
by: whitc26 | last post by:
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...
7
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent...
13
by: jmpigott | last post by:
I have searched forever trying to solve a problem that simplifies recurring info inputs to my database the basic structure is Orders tbl main form and pricing_tbl subform and third when orders...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.