473,394 Members | 2,160 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,394 software developers and data experts.

Moving from one form to another and then back

I'm sure there is an easy solution for this problem. On "FORM A" is a
combobox with a separate table as its record source. If the data
required in the combobox is not one of the available choices in the
underlying recod source, the user is prompted to "click" a button
opening "FORM B" allowing them to add the necessary data to the
combobox's underlying recordset. Is there a way when closing FORM B and
returning to FORM A to requery the combobox on FORM A so the data that
was just added to the underlying recordset is now one of the available
choices in the combobox?

Thanks
Scott

Nov 13 '05 #1
3 2696
sc******************@gmail.com wrote:
I'm sure there is an easy solution for this problem. On "FORM A" is a
combobox with a separate table as its record source. If the data
required in the combobox is not one of the available choices in the
underlying recod source, the user is prompted to "click" a button
opening "FORM B" allowing them to add the necessary data to the
combobox's underlying recordset. Is there a way when closing FORM B
and returning to FORM A to requery the combobox on FORM A so the data
that was just added to the underlying recordset is now one of the
available choices in the combobox?

Thanks
Scott


Open FormB with the acDialog option then add a requery in the next line of
code.

DoCmd.OpenForm "FormB",,,,,acDialog
Me.ComboBoxName.Requery

The acDialog option will cause the code to pause after the OpenForm method
and will not execute the last line until FormB has been closed.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
Excellent! I knew it was something simple. Thanks for your help.

Scott

Nov 13 '05 #3
Sure; this is a very common setup. In the On Close property of formB, put
some code like:

Forms!formA!myCombo.Requery

This assumes that formA will always be open. If not, add error checking to
handle cases when it is not.
Your combobox on formA will now show the record you just added on formB.
-Ed
<sc******************@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
I'm sure there is an easy solution for this problem. On "FORM A" is a
combobox with a separate table as its record source. If the data
required in the combobox is not one of the available choices in the
underlying recod source, the user is prompted to "click" a button
opening "FORM B" allowing them to add the necessary data to the
combobox's underlying recordset. Is there a way when closing FORM B and
returning to FORM A to requery the combobox on FORM A so the data that
was just added to the underlying recordset is now one of the available
choices in the combobox?

Thanks
Scott

Nov 13 '05 #4

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

Similar topics

4
by: Stephen Ghelerter | last post by:
I am moving a web site with a MySql database to another server. Can I create a database on the new server with the same name and then move the tables there, or is life not that simple? Or can I...
15
by: Deano | last post by:
I've posted about this subject before but haven't really got anywhere yet. I have now come up with a plan of action that takes into account my strong desire to implement save/discard functionality...
12
by: swingingming | last post by:
Hi, in the NorthWind sample database, when clicking on the next navigation button on the new order record with nothing on the subform (order details), we got an order with nothing ordered. How can...
3
by: Corey | last post by:
Dear All, I know there's a simple solution to what I want to do, but for the life of me I can't figure it out. I think it's because I've been corrupted by too long with VB6..... :) Any way...
5
by: Pablo Cedeno | last post by:
Hi all, I'm having a problem with a form position. I need to prevent the user to drag the window. I tried to maximize the window but i still can move the window. I found something about...
5
by: Kay | last post by:
Hello, I have two list boxes on my form, one initially displays with items and the other displays blank, by clicking a button, it is possible to move items from one box to another and vice a...
0
by: Jeff Waskiewicz | last post by:
Here is what I am trying to accomplish. I have an MDI application on the left side of the client area I have a borderless form that holds a treeveiw for navigation. When an item is selected from...
0
by: jvitti | last post by:
I recently upgraded from Access 2000 to Access 2007 and I am having trouble with moving the focus from 1 form to another. While doing data entry if a similar claim is found the claim view form...
3
prn
by: prn | last post by:
Hi folks, I've got something that's driving me crazy here. If you don't want to read a long explanation, this is not the post for you. My problematic Access app is a DB for keeping track of...
15
by: mcjason | last post by:
I saw something interesting about a grid pair puzzle problem that it looks like a machine when you find each that work out the way it does and say with all the others that work out the way they...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.