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

Requery Combo-box from seperate form

Hi

I am having a problem with the visualbasic for requerys in access. I have had a look at some of the other discussions but i can't find an answer.

So, my problem is this.

I have a form with several different combo boxes, from which the user will select an option. If what they require is not there, they double click on the combo box and it brings up another form in which the put in data. Once they click a button it closes the new form and goes back to the main form (which stays open the whole time).

I want the buttons on the other forms to requery the combo-boxes on the main form, so that when someone enters something on one form, it will appear back in the combo-box on the main one.

So, basically i need to be able to Requery a combo-box on one form, from another form.

Any help would be greatly appreciated
Jun 16 '07 #1
2 8386
FishVal
2,653 Expert 2GB
Hi

I am having a problem with the visualbasic for requerys in access. I have had a look at some of the other discussions but i can't find an answer.

So, my problem is this.

I have a form with several different combo boxes, from which the user will select an option. If what they require is not there, they double click on the combo box and it brings up another form in which the put in data. Once they click a button it closes the new form and goes back to the main form (which stays open the whole time).

I want the buttons on the other forms to requery the combo-boxes on the main form, so that when someone enters something on one form, it will appear back in the combo-box on the main one.

So, basically i need to be able to Requery a combo-box on one form, from another form.

Any help would be greatly appreciated
Hi.

Use "Forms" collection to refer to opened form properties.

Example.
Expand|Select|Wrap|Line Numbers
  1. Forms![frmTargetForm].Controls![cmbTargetCombo].Requery
  2.  
Be aware that "Forms" collection contains opened forms only.


Good luck.
Jun 16 '07 #2
Hi,

I don't know what you mean by Form collections, but I put in the code you posted and it works.

Thank you!
Jun 17 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jimmy | last post by:
Does anyone know if refreshing particular row data possible in subform? For example: Subform has two field: Vendor and product In first row, is it possible that when you select a vendor only...
0
by: Dalan | last post by:
I'm sure there is a workaround for this, but haven't found it yet. I have a mainform with two subforms and after one or both of the subforms are updated, then clicking the Refresh button on the...
20
by: MS | last post by:
Access 97 I want to requery the data being displayed on a form, then I want to return to the record I was in. Why doesn't this code work? Private Sub CmdRefsh_Click()
2
by: Wayne | last post by:
I've found a few posts on this subject but no reason for the behaviour. Is there any logical reason that Docmd.Requery "MyControl" won't work under Access 2K but Me.Requery.MyControl will? Is...
8
by: Tom | last post by:
I have the following code structure (abbreviated) Do Until RstA.EOF Do Until RstB.EOF RstB.MoveNext Loop RstA.MoveNext Loop
4
by: ken | last post by:
Hi, In my after_insert event on a form I add additional records to the table. The problem I'm running into is that I need for those records to show up after the after_insert event ends. If I...
2
by: Peter Van Wilrijk | last post by:
Hi, In VB6 I used a method requery to repopulate a recordset. I don't find an equivalent for the .NET dataset. I don't update my datasets at all, but I use them to navigate through subsets...
2
by: Max | last post by:
How do you for the datagridview control to requery the database?? Thanks, --max
1
by: Parasyke | last post by:
I have a subform within a tabpage that will requery/refresh (?) if I press F9 and it will update the data in the subform, but I have tried various combinations of Me!SubformName.requery...
5
by: ApexData | last post by:
I have a ComboBox, when dblClicked, displays the combobox's row content in a continuous subform. Changes can be made to this content in the subform and then closed. The ComboBox needs to be...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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.