473,378 Members | 1,518 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,378 software developers and data experts.

Link Pop up Form to main form

I have a main form and use a combo box to open a pop up form. The
combo box lists customers and only one customer requires the fields
that are found on the pop up form.

I can get the form to pop up however I do not know how to link the pop
up form data to the main form record.

Oct 16 '07 #1
6 5683
On Oct 16, 6:54 am, CJONES <craig...@hotmail.comwrote:
I have a main form and use a combo box to open a pop up form. The
combo box lists customers and only one customer requires the fields
that are found on the pop up form.

I can get the form to pop up however I do not know how to link the pop
up form data to the main form record.
What else does the combo box do? Does it select a record for editing,
the majority of whose fields reside on the main form? If that is the
case, then you could set the rowsource of the popup form to the
rowsource of the main form. Store the rowsource of the main form to a
string variable and pass it in the openargs to the popup form. In the
pop-up forms' form_load event, assign it to the popup forms' rowsource.

Oct 16 '07 #2
On Oct 16, 11:22 am, OldPro <rrossk...@sbcglobal.netwrote:
On Oct 16, 6:54 am, CJONES <craig...@hotmail.comwrote:
I have a main form and use a combo box to open a pop up form. The
combo box lists customers and only one customer requires the fields
that are found on the pop up form.
I can get the form to pop up however I do not know how to link the pop
up form data to the main form record.

What else does the combo box do? Does it select a record for editing,
the majority of whose fields reside on the main form? If that is the
case, then you could set the rowsource of the popup form to the
rowsource of the main form. Store the rowsource of the main form to a
string variable and pass it in the openargs to the popup form. In the
pop-up forms' form_load event, assign it to the popup forms' rowsource.
Not quite sure but I will try to explain in my own words. The record
is based on a certification # which is the primary key for the table
that contains the records. The combo box is used to select the
customer which will be added to the record.

A specific customer (e.g ABC Corp) requires additional data to be
added to the certification record. This data will be added through the
pop up form when ABC Corp is selected in the "Customer" combo box.

Oct 16 '07 #3
On Oct 16, 9:50 am, CJONES <craig...@hotmail.comwrote:
On Oct 16, 11:22 am, OldPro <rrossk...@sbcglobal.netwrote:
On Oct 16, 6:54 am, CJONES <craig...@hotmail.comwrote:
I have a main form and use a combo box to open a pop up form. The
combo box lists customers and only one customer requires the fields
that are found on the pop up form.
I can get the form to pop up however I do not know how to link the pop
up form data to the main form record.
What else does the combo box do? Does it select a record for editing,
the majority of whose fields reside on the main form? If that is the
case, then you could set the rowsource of the popup form to the
rowsource of the main form. Store the rowsource of the main form to a
string variable and pass it in the openargs to the popup form. In the
pop-up forms' form_load event, assign it to the popup forms' rowsource.

Not quite sure but I will try to explain in my own words. The record
is based on a certification # which is the primary key for the table
that contains the records. The combo box is used to select the
customer which will be added to the record.

A specific customer (e.g ABC Corp) requires additional data to be
added to the certification record. This data will be added through the
pop up form when ABC Corp is selected in the "Customer" combo box.
I wonder if you are using the word "record" in the standard way. A
table is made up of rows and columns. Each row is a record, each
column (at any particular row) is a field. If the table stores
customer information, and there is already a customer recorded at a
certain row, then how would you "add" anything to that record? You
can't add a customer; it is already there. You could update (not add)
one of the other fields with more timely information (phone no. for
example). You could "add" a new customer to the table (not to the
record) which in turn would create a new record. Another way of
looking at it is that a table is a list of records, and a record is a
list of related fields.
My guess is that if you are uncertain about the terminology of
database management, then you probably didn't understand my suggestion
at all. If that is the case, then perhaps a non-programming solution
is required. The only one I can think of is to add more fields to the
form and forget about the popup.

Oct 16 '07 #4
On Oct 16, 7:23 pm, OldPro <rrossk...@sbcglobal.netwrote:
On Oct 16, 9:50 am, CJONES <craig...@hotmail.comwrote:
On Oct 16, 11:22 am, OldPro <rrossk...@sbcglobal.netwrote:
On Oct 16, 6:54 am, CJONES <craig...@hotmail.comwrote:
I have amainformand use a combo box to open a pop upform. The
combo box lists customers and only one customer requires the fields
that are found on the pop upform.
I can get theformto pop up however I do not know how tolinkthe pop
upformdata to themainformrecord.
What else does the combo box do? Does it select a record for editing,
the majority of whose fields reside on themainform? If that is the
case, then you could set the rowsource of thepopupformto the
rowsource of themainform. Store the rowsource of themainformto a
string variable and pass it in the openargs to thepopupform. In the
pop-up forms' form_load event, assign it to thepopupforms' rowsource.
Not quite sure but I will try to explain in my own words. The record
is based on a certification # which is the primary key for the table
that contains the records. The combo box is used to select the
customer which will be added to the record.
A specific customer (e.g ABC Corp) requires additional data to be
added to the certification record. This data will be added through the
pop upformwhen ABC Corp is selected in the "Customer" combo box.

I wonder if you are using the word "record" in the standard way. A
table is made up of rows and columns. Each row is a record, each
column (at any particular row) is a field. If the table stores
customer information, and there is already a customer recorded at a
certain row, then how would you "add" anything to that record? You
can't add a customer; it is already there. You could update (not add)
one of the other fields with more timely information (phone no. for
example). You could "add" a new customer to the table (not to the
record) which in turn would create a new record. Another way of
looking at it is that a table is a list of records, and a record is a
list of related fields.
My guess is that if you are uncertain about the terminology of
database management, then you probably didn't understand my suggestion
at all. If that is the case, then perhaps a non-programming solution
is required. The only one I can think of is to add more fields to theformand forget about thepopup.
I think my description of the problem may be confusing. The record
itself is based on the certification number which includes the
customer as a field. When a certain customer is selected in the combo
box on the main form a popup form opens in which the user enters data
(update certification record) that is specific to that customer.

I have tried to link the forms based on the certification field.

All data is stored in the same table however for most of the customers
several of the fields will be null.

Hope this clarifies the problem.

Thanks
Oct 26 '07 #5
CJONES wrote:
I think my description of the problem may be confusing. The record
itself is based on the certification number which includes the
customer as a field. When a certain customer is selected in the combo
box on the main form a popup form opens in which the user enters data
(update certification record) that is specific to that customer.

I have tried to link the forms based on the certification field.

All data is stored in the same table however for most of the customers
several of the fields will be null.

Hope this clarifies the problem.
Generally, it is not a good idea to edit the same record at the same time with
two different forms. As far as the database is concerned it will look like two
different USERS editing the same record and you will get conflict errors. You
can use code to Save/Refresh as you move between the two that could solve that,
but a much simpler practice is to use one form with a TabControl. Then you just
put the additional fields on the second page of the TabControl.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Oct 26 '07 #6
On Oct 26, 9:20 pm, "Rick Brandt" <rickbran...@hotmail.comwrote:
CJONES wrote:
I think my description of the problem may be confusing. The record
itself is based on the certification number which includes the
customer as a field. When a certain customer is selected in the combo
box on themainformapopupform opens in which the user enters data
(update certification record) that is specific to that customer.
I have tried tolinkthe forms based on the certification field.
All data is stored in the same table however for most of the customers
several of the fields will be null.
Hope this clarifies the problem.

Generally, it is not a good idea to edit the same record at the same time with
two different forms. As far as the database is concerned it will look like two
different USERS editing the same record and you will get conflict errors. You
can use code to Save/Refresh as you move between the two that could solve that,
but a much simpler practice is to use oneformwith a TabControl. Then you just
put the additional fields on the second page of the TabControl.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Thanks for the advice I think I will add tabs to the main form.

Oct 29 '07 #7

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

Similar topics

2
by: Deborah V. Gardner | last post by:
I am using Access 97 and have had a problem joining a main form and a subform. I have a main form and a subform. The data source on the main form is a SELECT statement referring to three tables....
3
by: Mark C | last post by:
I have a unbound form with a tab control with four tabs in an Access 97 database. On each tab I have a sub form each form on the sub forms is bound to its own table. Each table has a field that can...
6
by: Rod Snyder | last post by:
I'm trying to set up a page with an asp.net link button that would send a user to a certain page and on page load execute a specific stored procedure tied to the button on the previous page. The...
0
by: John Phelan-Cummings | last post by:
Goal: To improve an application's performance by basing sub forms on queries: The application has a front and back-end. There is no SQL server back-end involved. I use a module file for,...
1
by: VanZandt | last post by:
I have a class(dll) that extends winform datagrid to provide link column in vb.net. I have managed to create a datagrid in c# winforms that shows link in one of the column but when I try to create a...
11
imrosie
by: imrosie | last post by:
Hello Experts This is a hard one (I still speak newbie). An expert may think it's not a big deal, but, I am trying to replace my Main Order form with a subform because of the following: ...
2
by: BBLP | last post by:
Hi, I'm sure this is a really simple thing to do but I'm fairly new to Access... I used the Wizard to create a form linked to another - this is fine and the linked form is filtered by the Primary...
5
by: aagarwal8 | last post by:
Hi, I have a windows applicationm which can open seversal forms from a main form. All the forms that are opened, from main form (as well the main form) have a link to the help (.chm) file. I...
2
by: Papote | last post by:
I have a database that in Table form it shows the subdatasheets that make refrence to the main table. It is basically a Menu ordering system. Goes something like this: MenuByCycle (Contains: Cycle...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...

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.