By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,604 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

Link Pop up Form to main form

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.