473,785 Members | 2,573 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Linking Pop up form to Main form

I have a main form with a combo box where if a specific customer is
selected a popup form opens and additional information required for
this customer is entered into the form. Data from the main form and
popup form is stored in the same table. I have a field called
certification that I would like to use to link the forms.

Oct 26 '07 #1
2 1801
Greetings,

what you need to do is to open the popup form in dialog mode (which is
probably already the case). In the popup form you need to add a public
property (Get) and assign it the desired value. Note: a form is just a
class module except that it has a graphical user interface (GUI - the
GUI thing happens way under the hood for Access).

In the popup you can create a public property anywhere in the Form's
code module (not a standard module or standalone class module). In my
sample I am setting a Certification property to a Long datatype. If
your Certification is a string, then set the property to String

'--code for popup form
Public Property Get Certification() As Long
Certification = CLng(txtCertifi cation.value)
End Property

Private Sub cmdOK_Click()
Me.Visible = False
End Sub

In the popup form here I have a textbox called txtCertificatio n. A user
enters information here then clicks an OK button (cmdOK) which only
hides (Me.Visible = False) the form (don't unload the form - it has to
be running so that you can read the value from its property). In the
calling form you would call the popup like this:

'--code for main form
Private Sub Command3_Click( )
On Error Resume Next
DoCmd.Openform "frmPopup", acNormal, , , , acDialog, "test123"
Debug.Print Forms("frmPopup ").Certificatio n

End Sub

You can also pass a value to the popup using the openArgs property.
Here I pass "test123" to the popup. You can read the value in the popup
Load event

Private Sub Form_Load()
txtCertificatio n = Me.OpenArgs
End Sub

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Oct 26 '07 #2
ARC
Assuming both forms have the same recordsource, all you have to do is make a
slightly different record source on the popup, where you will refer to the
main form.

For example, if the main form is called Customers, and has a hidden field on
it called CustomerID, then the recordsource for your popup form would be the
same as the original, however, add the field: CustomerID, and set critieria
to: forms!Customers .form!CustomerI D

Hope this helps,

"CJONES" <cr******@hotma il.comwrote in message
news:11******** **************@ y42g2000hsy.goo glegroups.com.. .
>I have a main form with a combo box where if a specific customer is
selected a popup form opens and additional information required for
this customer is entered into the form. Data from the main form and
popup form is stored in the same table. I have a field called
certification that I would like to use to link the forms.
Oct 26 '07 #3

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

Similar topics

7
5123
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting normal functions in header files results in multiple definition errors even when include guards are used. -- STH Hatton's Law: "There is only One inviolable Law" KDevelop: http://www.kdevelop.org SuSE: http://www.suse.com Mozilla:...
3
2488
by: Thomas Ruschival | last post by:
Hi, as far as I know I can link all C libraries in C++ as well. but I can't get it done with pslib. pslib is a library to create Postscript documents. The exactly same code compiles and links with C and it doesn't when I use C++. This is my linking command: gcc -o test -L/usr/lib/ -lps -lstdc++ test.cpp and in /usr/lib is definitely the file /usr/lib/libps.so -> libps.so.0.2.4
11
4534
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my database,just help in getting me pointed in the right direction. I have a database with 8 tables, which from what I have read, cannot be linked on a single form, and be updatable. I have created a query which includes all 8 tables, and then...
2
4678
by: Mike Boozer | last post by:
I have two subforms on my main form. I want the records on subform B to correspond with the records on subform A which they do. However, I want the records on subform A to let me know if there is a corresponding record on subform B without having to go to subform B to see for myself. Take a look at the screenshots of what I am trying to accomplish at http://www.chemreport/test/helpme.htm Main Form = ChemicalInventory w Primary IDPartNo...
3
4375
by: walkeraj | last post by:
I'm trying to compile an open source game called IVAN , and I'm able to compile it from a makefile, but not from an IDE. I have attempted to recreate the way the makefile compiles the project as closely as possible, yet I'm getting odd linking errors. I think I've traced it to some kind of problem with the SDL libraries it uses, yet I can't explain why it will compile from the makefile and not from the IDE. I have made sure that the ide...
2
4116
by: SREDWORB | last post by:
Hello, Try to explain this as best as I can. I have a main form with several cmd buttons, (Not interested in subforms for this project) that opens popup forms. Example: Main form frmPerson, cmd button cmdVehicle, when clicked opens frmVehicle displaying control boxes to be populated by the user. My problem is that I can't figure out how to link this PopUp Form frmVehicle to the main form, frmPerson. I tried openargs but when I attempt...
0
1746
by: Mary | last post by:
I have a main form with one subform that is used to record test scores. The main form has the following fields: WratStudentID ( a combo box with 2 fields - student id and student name - . Stores the id) WratGradeLevel WratDateAdmin (mm/dd/yyyy) WratForm
3
3186
by: TonyJH226 | last post by:
I’m using Access 2003 and am a novice to Access. I am creating a form to facilitate data entry to seven tables. The main table (A) has four sub-tables that are related to the main table by one-to-one relationships. A fifth sub-table (B) has a one-to-many relationship to Table A and serves as a bridge to another table (C) also with a one-to-many relationship to that table. So far, I have used the sub-form wizard to create the main form and...
3
2245
by: Robert McEuen | last post by:
Using A2K3, Windows XP I'm handling a many-to-many relationship with a linking table structure as follows (irrelevant fields omitted): tblIssue PK_IssueID (autonumber, primary key) IssueName (text) tblArea
2
6966
by: rlamber | last post by:
Hello, I have 2 subforms in a Main form, one links fine, the other doesn't. I am trying to link them both to a "tracking ID" on the main form. The Tracking ID is a text field that is a combination of an auto-number and an Alpha expression. The subform that links fine is a comments form (continuous form with just date field and memo box) and the subform that won't link is a larger, more detailed form where I would like to add more than one...
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9485
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10098
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8986
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5390
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3662
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2890
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.