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
2 8458 FishVal 2,653
Recognized Expert Specialist
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. -
Forms![frmTargetForm].Controls![cmbTargetCombo].Requery
-
Be aware that "Forms" collection contains opened forms only.
Good luck.
Hi,
I don't know what you mean by Form collections, but I put in the code you posted and it works.
Thank you!
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 the
products associated with this vendor appears in product field.
Go to next row, select different vendor, now only products associated
|
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 mainform
(to show updated values), causes the updated subform(s) to
automatically scroll up to one blank line if a new record was entered,
or to the line that was edited. All of the prior subform records are
not viewable or accessible until exiting...
|
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()
|
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 there a list anywhere of any other little "gotchas" like this one
when running under Access 2K?
|
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
| |
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 requery the form during
but at the end of after_insert I don't see the recently added
records(using VBA the INSERT statement). However if I use a refresh
button(onclick me.requery) then I see the records. But I need to see
the records at the end of...
|
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 of my tables, saying my dataset contains primary keys, ordered
in a specific way. When I go the next, previous, first or last record
in the dataset I execute a select stored procedure. When I do an
insert, delete or update I call a stored...
|
by: Max |
last post by:
How do you for the datagridview control to requery the database??
Thanks,
--max
|
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
Me!Forms!Subformname.requery, etc. to put the F9 functionality into VBA
code but nothing seems to work... any ideas? Thanks!
|
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 requeried to immediately reflect
these changes. The problem is that I can't requery in the OnDblClick
event of the ComboBox because the event completes once the subform is
launched. I guess I could requery the combobox from the Close event of
the...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |