473,406 Members | 2,549 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,406 software developers and data experts.

How to transfer 2 values from form A to form B when form B is an extension of A?

I have created a database for a dental research study, which requires 5 different standardized forms (data gathering forms). One of this forms requires more than 300 fields, and hence, did not fit altogether in just one table. I created two tables and two forms in order to gather all the data. These two tables have a compound primary key because the combination of ID and Visit Number make the entry unique. I have included a control in Form A to open Form B, and is working accordingly. Now, I want to make the data entry process as seemless as possible, therefore, I want to click to open form B and have the ID and Visit number automatically populated, so that the data entry personnel only has to worry about completing the form and saving the record as soon as they finish form B.

I don't have extended knowledge on code, yet I have managed so far to make this thing work. I really need detailed explanation and steps to make this happen. Pleaseeeee!!! Thanks! By the way, Id is integer and visit number is lookup combobox.
Nov 3 '10 #1
1 1595
gnawoncents
214 100+
If ID and Visit Number need to be in two separate fields on the new form, you could try something like this:

In the on open event of Form B, include the following code:

Expand|Select|Wrap|Line Numbers
  1.     DoCmd.GoToRecord , , acNewRec
  2.     Me.[ID] = Forms!FormA![ID]
  3.     Me.[Visit Number] = Forms!FormA![Visit Number]
Depending on your setup, you may need to modify this approach.
Nov 3 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: RC | last post by:
I am try test a simple HTML form with PHP <form method=POST action="testing.php"> Cat <input type="checkbox" name="pet" value="cat"> Dog <input type="checkbox" name="pet" value="dog"> Pig...
2
by: Robin | last post by:
Ok, I have a form that on clicking of the Update button first updates the specific record in the db, then Inserts if the vMemo field is not empty. The problem that I'm having is that After...
2
by: developer | last post by:
I have a form with a menu on the top. This menu show another form. I want to open this second form maximized inside the parent form just below the menu of the parent form. (Like Microsoft...
5
by: Ron Vecchi | last post by:
I know the math I need to perform on width and height to keep an aspect ratio but where and how would I implement keeping a set aspect ratio on a form when a user resizes it. Override OnResize?...
1
by: steellock | last post by:
The below code always get compile error, "Can not change Interger to UInt32". Then How to set the BackColor property With TextObjec .Name = "txtProductCode .SetText("Apple" .BackColor = 8 '...
4
by: eBob.com | last post by:
I have a "parent" form (if that's the right terminology), Form1. I declare two public values in the parent form : Public Class Form1 Inherits System.Windows.Forms.Form Public CurDir As String =...
2
by: sujith.bolar | last post by:
Hello I am using a <form method="post"to submit values to the processing agent. If the processing agent returns an error, I call the history.go(-1) or history.back() function to reload the page....
1
by: SadikZ | last post by:
Hi everyone, I want to transfer my data from windows form of Visual basic .Net 2000 to another windows form of Visual basic .Net 2000, but i am not getting the code which i have to write...
1
by: geckobtz | last post by:
Hi Guys, I am trying to build a page in ASP/MSsql with the aid of dreamweaver, the page contains total of 6 Questions, each question has 3 choices, of which one of the choice contains the right...
1
by: metalforever | last post by:
How do you redirect a form after submit(form sends email) ? This is pretty urgent for me. I have included the code in a pastebin. http://pastebin.org/249014 process_form sends the email. ...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.