Refresh Subform2 Query when Subform1 Control Changes

I've got a "MainForm" with a tab control. On one page of the tab
control I have "Subform1" which has a control named "txtBox' tied to a
table. On another page I have another "Subform2" which has inside of
it a "Subform3" that relies on that "txtBox" from "Subform1". I want
to have that "Subform3" (which is based on a query of the table that
"txtBox" updates)  refresh when the "txtBox" changes. Here's a visual
and some code that does *not* work. Help Please!

MainForm
--Subform1 > txtBox
--Subform2 -- Subform3

Forms!MainForm!Subform1!Subform2.Form.Requery

This is attached to the txtBox AfterUpdate property. Why won't it
work?

-- Paul C., thanks.

0
pcross29
10/25/2007 11:21:08 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
919 Views

Similar Articles

[PageSpeed] 56

On Oct 25, 7:21 pm, pcros...@gmail.com wrote:
> I've got a "MainForm" with a tab control. On one page of the tab
> control I have "Subform1" which has a control named "txtBox' tied to a
> table. On another page I have another "Subform2" which has inside of
> it a "Subform3" that relies on that "txtBox" from "Subform1". I want
> to have that "Subform3" (which is based on a query of the table that
> "txtBox" updates)  refresh when the "txtBox" changes. Here's a visual
> and some code that does *not* work. Help Please!
>
> MainForm
> --Subform1 > txtBox
> --Subform2 -- Subform3
>
> Forms!MainForm!Subform1!Subform2.Form.Requery
>
> This is attached to the txtBox AfterUpdate property. Why won't it
> work?
>
> -- Paul C., thanks.

In the properties of the txtbox that will trigger the refresh when the
data changes, goto the onchange event and put in this code:

Me.Refresh

If that doesn't work use Me.Requery


0
Richnep
10/26/2007 6:08:10 AM
> In the properties of the txtbox that will trigger the refresh when the
> data changes, goto the onchange event and put in this code:
>
> Me.Refresh
>
> If that doesn't work use Me.Requery- Hide quoted text -

Nah. These didn't work. Wouldn't these just be refreshing the subform
that the textbox sits on? In any case, these didn't work because the
textbox is added to another textbox data entry value to calculate a
third control. As soon as you type one digit that "Refresh" or
"Requery" on the On Change property kicks in and doesn't even allow
you to enter a 2-digit number!

Thanks for looking.


0
pcross29
10/26/2007 3:45:25 PM
Reply:

Similar Artilces:

Changing the "from" email display
Is there a way that I can have Outlook display the email address of the sender, instead of their "user-friendly" name? What I'd like to do is be able to easily identify what domains all this SPAM stuff is coming from. I've looked at all of the options I can find, and so far, I've not found an answer. Thank you for taking your time to help me! Bryan Actually, to clarify, I know I can see it in the internet headers on individual emails. What I'm looking for is a way to view the actual email addresses for those emails in a specific folder. What I REALLY want to ...

Saving Queries from Address Book Views
I am working on a test machine with at least 40 custom search queries in Address Book View for the current profile; I would like to get a copy of 40 custom queries and apply to another system without having to re-write it again. Anyway to export queries from Address Book Views? OR Where is the location that keeps these queries? Prefs? Hoping if copy and paste query file on other machine would work. Thanks in advance. ...

Listbox Query Again
Sorry to ask again I have a problem with populating a listbox. I want to have the listbox populate using the current worksheet ranges a1:e1000. I know how to use the rowsource for individual list boxes but that would mean I would have to make many userforms up. I would rather have it run from 1 form. ANy advice would be great Thanks Greg Sorry I have worked that one out for myself Thanks Greg "Greg B" <laptopgb@ihug.com.au> wrote in message news:dgepep$1qg$1@lust.ihug.co.nz... > Sorry to ask again I have a problem with populating a listbox. I want to > ...

How to use ocx control in c++ without mfc support? Please!
...

Changing multiple hyperlinks
Hi, I have a spreadsheet with a list of about 100 hyperlinks to files I use and, because some of our folders have been moved and the folder names have changed, the links now no longer work. I have tried using edit/replace to change the links but that is only changing the name of the hyperlink not the actual link itself. Does anyone know of a way of changing the links for all of the files at all please? All of the links have the same root for example The files U:\CommercialServices\book1 U:\CommercialServices\book2 U:\CommercialServices\book3 U:\CommercialServices\book4 ...

Question about queries
I am trying to query a database that will include building some calculated fields. I am having trouble with the conditions I am trying to place on the calculations. An example is: IIf([recShortName]<>"sm/ WASH TRACTORS" OR "sm/WASH ALL TRAILERS" OR [recShortName] Not Like "bnsf*", Nz([bilUnit1],0)+Nz([bilUnit2,0),0) If the records recShortName is not "sm/WASH TRACTORS" OR "sm/WASH ALL TRAILERS" OR does not contain the text "bnsf" then I want to add the fields bilUnit1, bilUnit2, etc. The way I have it written above is obvious...

calculated control event order
I have a continuous subform with a calculated control in the footer to total a field on the subform. I'm trying to use events/code to "copy" that total to a bound control in the main form. Can't just use a calculated control on the main form (=subform!total) because the "total" on the main form may be over-ridden by a value at users discretion. I've tried using the AfterUpdate event (as well as others) of the subform control that can change (and therefore change the value of the total), but it appears that the calculated controls are not being...

Changing Language settings on Clients inbox and sent items
A while ago we had a major exchange issue which ended up with us creating a new exchange server and moving all our clients mailboxes (around 3500) of them from old server to new. Some of our clients were overseas at the time and have reported that thier inbox and sent items folder names are in the language of whatever country they were in at the time and remain that way after returning home. Is thier a simple way of altering the folder names to the correct language settings for our locality? Answers by email as well as posting to group please Thanks ...

how do i refresh or sync all?
I am trying to force my mail to refresh, or to look for new mail much like Outlook Express does when you click on "Sync All". Maybe I shouldn't be concerned with this. Does Outlook deliver mail as soon as it is processed by the server or is it sent at preset intervals set by the administrator? Les perhaps you mean Send/Receive ? Still learning wrote: > I am trying to force my mail to refresh, or to look for new mail much like > Outlook Express does when you click on "Sync All". Maybe I shouldn't be > concerned with this. Does Outlook de...

Inner Join query generating wrong result
My query is based on 2 tables (pounds & Hours). Both tables use autonumber as a PK. Both tables share 5 similar fields:(Year, Month, Week, Location, ProdCategory) but as you can see none of those fields is unique. The pound table has additional field (ProdCode) by which the pounds are grouped. In the query I need to show only the Year (no month/week), Location, ProdCategory, and SumOfPounds form the pound table, plus the (Hours) from the hours table. When I group all 4 fields and sum the pounds field, I get a large data (as if i'm pulling weekly data). When I sum the hours as wel...

Query Tables (excel odbc) memory problem
I discover that when i recounting more then 200 QT on one sheet with this simply code Set qt_data = result_sheet.QueryTables.Add("ODBC;DSN=Excel Files;DBQ=" + ActiveWorkbook.Name + ";DefaultDir=" + ActiveWorkbook.Path + ";DriverId=790;MaxBufferSize=2048;PageTimeout=5;", result_sheet.range("AA1"), sql_str) With qt_data .PreserveFormatting = True .FieldNames = False .BackgroundQuery = False .AdjustColumnWidth = False .RefreshStyle = xlOverwriteCells .Refresh End With qt_data.Delete my EXCEL.exe process (2003 ver.) becomes...

how do I calculate the change in a value between 2 Access records
I have a form containing a table's history of prices by date. I want to calculate the change in price from one record to the next. How do I calculate the change in a value between 2 Access records? records can be deleted from the table, so the calculation should always reference the next record and show the calculated change. Thanks for your help. How do you determine the "next" record? Since form filtering and ordering will affect the recordset, you can have a difficult time determining which record to use. If you have a rule that will determine what the next record ...

entering the string CNA in a cell is changed to CAN
I'm using Excel to store a few string oriented translation lists. When I type the string "CNA" into the list, Excel is automatically changing it to "CAN". This is happening in Excel 97 and Excel 2000. I've tried the normal string delimiter ' and changing the cell type from general to text, and it still keeps happening. I've also examined check the options. Any ideas about why this is happening? David, This is an autocorrect issue! Fix: Tools -> AutoCorrect Find the entry Replace: cna With: can Delete it. Will affect all office products (I think....

Change Associated Public Folder tree
Hi, I am unable to change Associated Public Folder tree after i created the PF store?!! When i go to Public Folder properties, there is no Browse button there to allow me to associate existing PF store to another tree. Do i need to use ADSI edit to perform this simple thing? pls guide. On Thu, 8 Jun 2006 08:03:02 -0700, Jack Dorson <JackDorson@discussions.microsoft.com> wrote: >Hi, > >I am unable to change Associated Public Folder tree after i created the PF >store?!! >When i go to Public Folder properties, there is no Browse button there to >allow me to associ...

how to NOT show a listbox in a query / report that is defined at the table level?
I have a listbox defined in the lookup tab of a table. I like it that way because I don't have to mess around with forms - I'm the only one using this database, and I find it easier just to enter data into the table. But when I go to do a report, that listbox carries over. I tried creating a query, hoping the listbox would disappear - nope its there. I want to tell Access to just query the data - snapshot (which I selected) - not show me a listbox for data entry. And the same goes for the report. I only want that listbox to appear when I'm in the table. Any ideas? I'm us...

How to change the taskbar grouping icon ??
Hi all, I am developing a VC++ dialog based application. I wanted to change my application icon and edited the .ico file. It is woking fine.It getting reflected in almost all places. But when I open my application several times simultaneously, the entries in the taskbar are getting grouped, and at that time the grouping icon is the task bar is same as the old one.But the individual entires in the taskbar are showing the new one. how to change the icon while the entries are grouped in taskbar ? I am working on Windows XP os. Any help would be appreciated. Icon's files can hav...

Refresh some not Refresh All
Hello. I have a workbook with 10 sheets all of which have external data that needs to be refreshed periodically. Most of the time I only need to refresh 8 of the sheets. Is there a way to refresh just those 8 without having to refresh each one separately? Thanks in advance. You can use a macro to do it. It would go something like this... Sub RefreshSome() Dim wks As Worksheet Dim qt As QueryTable For Each wks In Worksheets Select Case wks.Name Case "Sheet1", "sheet2" Case Else For Each qt In wks.Que...

How to change transparency of series
Do you know how to use the transparency button in Format data series->Patterns->Fill Effects->Gradient? I found the button in it is grey. Hi, Transparency is not available in older versions of windows xl, pre 2007. For a work around http://j-walk.com/ss/excel/usertips/tip071.htm Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Christine Ma" <ChristineMa@discussions.microsoft.com> wrote in message news:FA965B33-F7DF-4657-AFCE-47887D248DFC@microsoft.com... > Do you know how to use the transparency button in Format data > series->P...

use expression as field name in query
I'm trying to use an expression to create a field name in a query. I have an "Employee" file. that has fields "Sun", "Mon", "Tue" ... "Sat" that contain their normal number of hours scheduled. I have a function DayName(schdate) that uses the Weekdayname(date) to get the day of the week, based on a date field, that returns the string "Mon" or "Tue" etc. I want to use the resulting DayName as the fieldname to get the normal #hours. I have a function that returns the string "Mon" or "Tue" correc...

Adding a variable bound to a control
Hello all, I am using the new "Add variable wizard" in VS.NET 2003 to add a variable bound to an edit control in my MFC dialog box application. The wizard does not display CString in the list of available data types (I have to type it myself), does not allow me to enter an initial value for the variable, and finally, <i>does not create the DDX_Text call in DoDataExchange</i>!!! I could just as well type in everything myself and get done with it. Is there another way to create the variable? What do you do to get around this? Or is it just a way to discourage people from us...

Cascaded queries
I need to produce a list of club members that had renewed their membership by a certain date and exclude those who joined after this date. OK easy so far, but I need to then say how many are family heads and how many are spouses, cadets, etc. requiring further queries based on the first query. Is there some way the first query can form a temporary table so that I don't have to type in the date criteria several times to get the numbers I require. Colin Create a form not linked to any table (AKA unbound form) named frmSearch. On this form put a text box named txtMembershipDate. A...

Joining 2 mailing lists in query
I have a master mailing list in a table consisting of about 40,000 records for about 50 different sales representatives. When a new sales person is hired, they bring their own mailing lists in with them which cannot be added to our master list. I would like, however, to have each individual list in the database and be able to, when they want to do an individual mailing, pull records from both their current and their old lists in one query. It seems like it should be rather easy but I cannot figure out how to do it. Hi Ratat, Have you tried a make table query? Join the two tables ...

Refresh 1 subform from another
I am trying to refresh a subform from another subform and I cannot seem to make it work. I have a button on subform 2 that needs to have subform1 refresh. I used Me.subform1.mainform.form.refresh and I get an error that says Method or Data Member not found. Anyone know what I did wrong? I am thinking I should use ! instead of . but I don't know what the difference is between them. Any help? -- Thanks As Always Rip Ripper wrote: >I am trying to refresh a subform from another subform and I cannot seem to >make it work. I have a button on subform 2 that needs to have su...

VWD2008 will not refresh HTML file
I am trying to use the showmodaldialog function to display help files for my website. But when I make modifications to the HTML file, a previous version of that file is displayed from within the VWD environment, even if I just want to debug that file. I have restarted VWD, but the old version is still displayed. When I double-click that same file outside the VWD environment, the modified version is displayed, so I know the changes are being saved. I have searched the entire hard drive and there is no other file with the same name. ...

HOw do I change group of cells from absolute reference?
When I do a Paste Special>Paste Link, the cell looks something lik ='MAIN'!$A$3. This is great, its just what I want. Now I remove the beofre the 3 and drag the cells so my list is linked correctly, like ='MAIN'!$A3, ='MAIN'!$A4, ='MAIN'!$A5, and so on. If I don't remove th $, it just stays as $A$3 for every item. Here's my question. Is there and easy way to convert the cells back t being locked with the $ in place again like: ='MAIN'!$A$3 ='MAIN'!$A$4, ='MAIN'!$A$5, and so on? Sometimes the list is long an its a pain puttin...