Update a form from a form

wroyce

New Member
Joined
Mar 28, 2004
Messages
26
I have two tables, a query that joins the two tables and two forms.

The Table 1 has an auto-number field called "Record." Table 2 has a number field called "Record" (these two fields are my join).

On Form 1 I have the auto-number field "Record" and on Form 2 I have the number field "Record." I use a command button to call Form 2 from Form 1. I would like to type my information in Form 1 (the auto-number field would automatically update) and when I click the command button to call Form 2, I would like the matching field "Record" to automatically be updated with same number as the auto-number field from Form 1.

Can this be done?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Yes this can be done but before we do this, have you considered using a subform? A subform is a form embedded inside another form and it sounds like it would be perfect for what you want to do. When you create a record in the main part of the form (updating table 1) then when you go into the subform, it picks up the record ID from the main part of the form and stores the record ID's in the second table automatically and you get to see the main records and subform records all on the same screen. Is this an option instead of using 2 different forms?

Andrew
 
Upvote 0
I wanted to use a pop up form because 1)the information contained in this form won't always be filled in 2)Form 1 is a bit long and I didn't want to lengthen it by adding to it (I'm trying to keep it all on the screen) 3)I want the user to have to make a choice to use this form.
 
Upvote 0
I wanted to use a pop up form because 1)the information contained in this form won't always be filled in 2)Form 1 is a bit long and I didn't want to lengthen it by adding to it (I'm trying to keep it all on the screen) 3)I want the user to have to make a choice to use this form.

Just to make sure you understand that the subform can be in the form of a tab off of the main form, doesn't really add much in the way of size, etc.

If you want to use two forms, what type of control is the 'record' you want to copy from and what type of control are you copying to?

Perry
 
Upvote 0
I'm not sure what is meant by type of control.

In Form 1 the field "Record" is a auto-number long integer.
In Form 2 the field "Record" is a number long integer.
 
Upvote 0
I'm not sure what is meant by type of control.

In Form 1 the field "Record" is a auto-number long integer.
In Form 2 the field "Record" is a number long integer.

What I am talking about is the type of control that displays the record in the first userform (such as a listbox, combobox, textbox, etc.) as well as the target control in the second userform.

Perry
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top