Link Pop up Form to main form
Link Pop up Form to main form
am 16.10.2007 13:54:51 von CJONES
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.
Re: Link Pop up Form to main form
am 16.10.2007 15:22:19 von OldPro
On Oct 16, 6:54 am, CJONES wrote:
> 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.
Re: Link Pop up Form to main form
am 16.10.2007 16:50:36 von CJONES
On Oct 16, 11:22 am, OldPro wrote:
> On Oct 16, 6:54 am, CJONES wrote:
>
> > 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.
Re: Link Pop up Form to main form
am 16.10.2007 23:23:14 von OldPro
On Oct 16, 9:50 am, CJONES wrote:
> On Oct 16, 11:22 am, OldPro wrote:
>
> > On Oct 16, 6:54 am, CJONES wrote:
>
> > > 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.
Re: Link Pop up Form to main form
am 26.10.2007 15:54:08 von CJONES
On Oct 16, 7:23 pm, OldPro wrote:
> On Oct 16, 9:50 am, CJONES wrote:
>
>
>
> > On Oct 16, 11:22 am, OldPro wrote:
>
> > > On Oct 16, 6:54 am, CJONES wrote:
>
> > > > 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
Re: Link Pop up Form to main form
am 27.10.2007 01:20:37 von Rick Brandt
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
Re: Link Pop up Form to main form
am 29.10.2007 12:43:04 von CJONES
On Oct 26, 9:20 pm, "Rick Brandt" wrote:
> 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.