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

Requery Sub-Form

I currently have a form which contains a macro.

When a button is pressed, the macro opens up another form to allow a
user to add data. When the form is closed, I want the macro do do a
Requery so that the new data is instantly available.

What do I need to put into the requery Control Name?

The Sub Form is called 'History_Screen'
The Table is called 'History'
The Field I want updated is called 'Staff/Location'

I have tried History_Screen.History.Staff/Location as the Control
Name, but I am told that this field doesn't exist.

I am new to Access which is why I am probably so stuck!

Thanks :)
Nov 15 '07 #1
1 2227
You need to use the full name of the control in question.

Main form: frmMyForm (or Me)

Subform: frmMyForm!MySub1

Control on subform: frmMyForm!MySub1.form!MyControl

-Ed
"Simon Argent" <Si**********@gmail.comwrote in message
news:2d**********************************@v4g2000h sf.googlegroups.com...
>I currently have a form which contains a macro.

When a button is pressed, the macro opens up another form to allow a
user to add data. When the form is closed, I want the macro do do a
Requery so that the new data is instantly available.

What do I need to put into the requery Control Name?

The Sub Form is called 'History_Screen'
The Table is called 'History'
The Field I want updated is called 'Staff/Location'

I have tried History_Screen.History.Staff/Location as the Control
Name, but I am told that this field doesn't exist.

I am new to Access which is why I am probably so stuck!

Thanks :)

Nov 17 '07 #2

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

Similar topics

0
by: Alienz | last post by:
Hey, I was reading the google groups for info on this but the explanation left out exactly how to do the query.. Lets say I have table1 with 2 combo boxes combo1 has a value list of: "new",...
2
by: Hansen | last post by:
Hi I have a list box which I refresh by changing the .rowsource and doing a requery after adding a record to the table: QryOrderDetail = "SELECT ., ., ., ., ., .,
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...
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...
4
by: Morten Snedker | last post by:
Hi, Text is entered into textbox and is send to LoadData as SearchString. Now I want to update the datagrid (dgOverview). The code below is me clutching at straws...how do I update the datagrid...
6
by: Gil | last post by:
Hello, I want a combox to requery each time it is being changed. What i am trying to do is have the combo box filter to the text being entered. The combo1 rowsource is: SELECT * FROM tbl WHERE...
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: Axel | last post by:
Hi all, I have a form (*) based on a query (let's call it qryOuter). qryOuter is based on resultset from qryInner which I am adding filters to and rebuilding via QueryDefs. When I then...
1
by: JohnHo | last post by:
I have a subForm which has as its source a query I would like to populate the subForm when the user exits from the last name control Private Sub txtLastName_Exit(Cancel As Integer) dim...
20
by: MNNovice | last post by:
I am new at understanding SQL - so please be patient with me. On frmEchoEnter the user is supposed to select a number from cboEchoSelect before the sub forms are enabled to receive data entry. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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...
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...

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.