subform-on Main form not refreshing queried job list

I am reposting - haven't gotten answer yet??? any ideas-Thanks!

I have a subform for jobs to be at list - when I am int the actual form it 
requeries and shows only the ones checked off - when I go to the mainform 
with the jobs to be at list as a subform - it does not refresh or requery 
unless I close and open back up again. I had added a refresh command button 
with the following code: 
DoCmd.RunCommand acCmdRefresh 
when i press the refresh button it refreshes the job list to be at 

I add this code to the Onload of the Main form - don't want user to have to 
press refresh button but it doesn't refresh jobs to be at list unless press 
refresh or close and open - added requery all over the place on load and on 
open of all main and subforms. 

what am i missing??? 
Barb
0
Utf
4/12/2010 12:20:01 PM
access 16762 articles. 2 followers. Follow

2 Replies
564 Views

Similar Articles

[PageSpeed] 45

You need to requery the subform on the main form.

Forms![NameOfMainForm]![NameofSubFormC*O*N*T*R*O*L*].Form.Requery

The name of the subform control is NOT necessarily the same as the name of the 
form object used by the subform control.

Refresh only refreshes the current record set - that is it will show changes 
to the existing records.  It will NOT add records to the recordset.  So if you 
are filtering by whether or not a field is checked, you will only refresh the 
records that were checked when you built the original set.  If a record that 
was checked is unchecked, a refresh will show that record as unchecked but 
will still show the record.  REQUERY is what you need.

If all this fails, try adding a button to the subform and add code to its 
click event that looks like
    Me.Requery

See if that works.  If it does then the next step would be to use
   Forms![NameOfMainForm]![NameofSubFormC*O*N*T*R*O*L*].Form.Requery
in the correct place.

The correct place might be in the main form's activate event
Or
in the close event of the form where you are checking/unchecking jobs-to-be-at
Or
Some other place.  It depends on what you are doing.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

babs wrote:
> I am reposting - haven't gotten answer yet??? any ideas-Thanks!
> 
> I have a subform for jobs to be at list - when I am int the actual form it 
> requeries and shows only the ones checked off - when I go to the mainform 
> with the jobs to be at list as a subform - it does not refresh or requery 
> unless I close and open back up again. I had added a refresh command button 
> with the following code: 
> DoCmd.RunCommand acCmdRefresh 
> when i press the refresh button it refreshes the job list to be at 
> 
> I add this code to the Onload of the Main form - don't want user to have to 
> press refresh button but it doesn't refresh jobs to be at list unless press 
> refresh or close and open - added requery all over the place on load and on 
> open of all main and subforms. 
> 
> what am i missing??? 
> Barb
0
John
4/12/2010 1:16:13 PM
Forms![NameOfMainForm]![NameofSubFormC*O*N*T*R*O*L*].Form.Requery 

This worked - I just had to add another subform2 to the end before requery 
but it worked.

thanks sooo much,
barb

"John Spencer" wrote:

> You need to requery the subform on the main form.
> 
> Forms![NameOfMainForm]![NameofSubFormC*O*N*T*R*O*L*].Form.Requery
> 
> The name of the subform control is NOT necessarily the same as the name of the 
> form object used by the subform control.
> 
> Refresh only refreshes the current record set - that is it will show changes 
> to the existing records.  It will NOT add records to the recordset.  So if you 
> are filtering by whether or not a field is checked, you will only refresh the 
> records that were checked when you built the original set.  If a record that 
> was checked is unchecked, a refresh will show that record as unchecked but 
> will still show the record.  REQUERY is what you need.
> 
> If all this fails, try adding a button to the subform and add code to its 
> click event that looks like
>     Me.Requery
> 
> See if that works.  If it does then the next step would be to use
>    Forms![NameOfMainForm]![NameofSubFormC*O*N*T*R*O*L*].Form.Requery
> in the correct place.
> 
> The correct place might be in the main form's activate event
> Or
> in the close event of the form where you are checking/unchecking jobs-to-be-at
> Or
> Some other place.  It depends on what you are doing.
> 
> John Spencer
> Access MVP 2002-2005, 2007-2010
> The Hilltop Institute
> University of Maryland Baltimore County
> 
> babs wrote:
> > I am reposting - haven't gotten answer yet??? any ideas-Thanks!
> > 
> > I have a subform for jobs to be at list - when I am int the actual form it 
> > requeries and shows only the ones checked off - when I go to the mainform 
> > with the jobs to be at list as a subform - it does not refresh or requery 
> > unless I close and open back up again. I had added a refresh command button 
> > with the following code: 
> > DoCmd.RunCommand acCmdRefresh 
> > when i press the refresh button it refreshes the job list to be at 
> > 
> > I add this code to the Onload of the Main form - don't want user to have to 
> > press refresh button but it doesn't refresh jobs to be at list unless press 
> > refresh or close and open - added requery all over the place on load and on 
> > open of all main and subforms. 
> > 
> > what am i missing??? 
> > Barb
> .
> 
0
Utf
4/12/2010 5:34:01 PM
Reply:

Similar Artilces:

subform in subform
Hi, I've got a form F and subform S1 in it. And inside S1 I've got subform S2. How do I reference a text box in S2 from VB code? thanx alek_mil Try: forms!F!S1!S2!textbox That should do the trick -- Maurice Ausum "alekm" wrote: > Hi, > I've got a form F and subform S1 in it. And inside S1 I've got subform S2. > How do I reference a text box in S2 from VB code? > thanx > > alek_mil You might find this useful as well... http://mvps.org/access/forms/frm0031.htm -- Jack Leach www.tristatemachine.com &q...

Outlook 2007
Folks, We have multiple large distribution lists of contacts with external email addresses. When sending email to 2 or more DL's it is highly likely that quite a few contacts belong to several DL's, and of course they receive multiple copies of the same message depending on how many DL memberships they belong to. Is it possible for Outlook to programmatically detect this situation and only send the message once to that contact? If not, then is anyone aware of what Outlook Addons or applications that can manage this? All suggestions are appreciated. Cheers, ..Al On 24 Jun 2...

list control problem
hello I am trying to make a list control , so that it will display both name and number when i enter them. 1) how do i delete an item from the list control ie void CSpeedDial::OnSpeedDel() { // } 2)how do i move an item up or down in the list contol using "up buttom" and "down buttom" i have created ie void CSpeedDial::OnSpeedUp() { } and void CSpeedDial::OnSpeedDown() { } 3)how do i make the "add buttom" disable when i have 8 items in the list control. this is what I have done so far: BOOL CSpeedDial::OnInitDialog() { CDialog::OnInitDialog(); ...

create a variable for all forms
Hi, I have a variable to link pictures to a form Me.ImgStock.Picture = "s:\pictures\" & Me.FOTO Everytime the picture path is modified, i need to enter in all forms and change the path to Me.ImgStock.Picture = "k:\pictures\" & Me.FOTO Is there a way to change the picture path only once, and all the forms to get the right path???? thanks in advance -- Thanks, Sorry if my english isn''t correct, but I''m from Potugal ;) Emanuel Violante Galeano Sure, you can create a table with 1 record, Path or a global variable. The table is pre...

Database Query
I have a spreadsheet that is querying the same database 25 times with 25 seperate worksheets. I get the following message when I automatically run the query at file open time. [SSDB] Too many tasks in use in the current app in FA_Task Create. I click OK and then get the following message. [Microsoft] [ODBC Driver Manager] Driver's SQL Set Connect Attr Failed. Am I running too many queries in 1 spreadsheet? Thanks for any suggestions. ...

Selecting items from list and attaching ratios to selection
I am struggling with the following. I would like to set up a sheet whereby I send the following to a user which would be in cells A1 and B1. Fund A $1m The user would then return the spreadsheet with the following Fund A $1m GBP,EUR,USD 0.5,0.4,0.1 having updated cells 3 currencies in cell C1, and 3 ratios (equalling 1) in cells D1. This corresponds to fund A being made up of $500k in GBP, $40Ok in EUR, and $100k in USD. I would like to create a form, probably activated on selection of the currency cell (column C), listing all currencies from...

Removing Organizational Forms from the Library
I've published a Organizational Form Library in Outlook and now need to remove it. Where do I go to do that. Thanks. See my response to your post in the forms group. --=20 Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "AllenM" <allen.miyake@gmail.com> wrote in message = news:OFNWq66kFHA.572@TK2MSFTNGP15.phx.gbl... > I've published a Organizational Form Library in Outlook and now need = to=20 > remove it. Where do I go to...

Form customization 09-02-05
Hi all I added a new tab (in Contact form) with some custom fields in the tab. I'm able to see it when I preview it. But, the custom tab doesnt get listed as a user when I am using it? I also tried with Publishing them, but didnt help. Please advise as what needs to be done --- Regards Paras You have to restart the IIS. In ASP.net the whole applicatoin is cached and runs in a tempory asp.net-application directory. So you have to run "iisreset" to let the changes appear. "Paras" <parasu78@gmail.com> schrieb im Newsbeitrag news:1125642862.492777.306350@g49g...

Language changes after update query
I have a data entry form where the user fills out text, numerical data, dates, etc. I created a button in the same form that runs a macro in background containing several update queries. At least 1 record changes from English to some other kind of language or font but it looks like Japanese or Chinese characters. I can't figure out why this happens and only on the that 1 macro. I would very much appreciate your input. TIA On Wed, 5 Mar 2008 10:10:01 -0800, Y2 <Y2@discussions.microsoft.com> wrote: >I have a data entry form where the user fills out text, numerical data, ...

How To Stop Acces From Update The Record When The Subform Query Is On Focus?
Hi I need to know how to stop acces from update the record when the subform query is on focus? Thanks In news:1177155216.699820.268130@d57g2000hsg.googlegroups.com, Chipcom <bz1977@gmail.com> wrote: > > I need to know how to stop acces from update the record when the > subform query is on focus? If you mean that you want to keep the main form's record from being saved when the subform gets the focus, the only ways you can do that are: 1. Have the main form be unbound. In that case your own code has to do the job of reading the record, assigning its field values to ...

Automated task to present data in a graph form.
Hi, I am newbie to Excel area. I got a requirement where in I need to present the Excel sheet data with 3 columns in a graphical form. Everyday, the excel sheet is populated with the current data. This is automated from the backend. I want to know whether there is any possibility of a macro which draws a graph with the data present in the excel sheet. It should be an automated task. Thanks for the help in advance. -- luckyguy ------------------------------------------------------------------------ luckyguy's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=285...

Textbox Information to Subform
I have a subform that I need to contain information from a main form. The sub form is linked by studentID, but I also need the tardy ID, TardyID, to populate the subDhall field txtTardyID. I tried the AfterUpdate of TardyID with this: Me!subDhall.txtTardyID=Me!frmTardyAdd.TardyID and Me!subDhall.frmTardyAdd.txtTardyID=Me!frmTardyAdd.TardyID to no avail. Anyone have any tips? -- Thanks As Always Rip "Ripper" <Ripper@discussions.microsoft.com> wrote in message news:753FE132-F478-4952-ABEE-EA884BB75A19@microsoft.com... >I have a subform that I need to contain informat...

Outlook 2003 Sharing Forms
Hi: I created a new Task Form and need for others on my team to be able to send it out as well. When I send it to other team members they are not bale to see the tabs or required fields on the from. Is there a simple resolution? Thanks. Try this page:: http://www.outlookcode.com/article.aspx?id=34 -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. ALWAYS post your Outlook version. How to ask a question: http://support.microsoft.com/KB/555375 After furious head scratching, Future Date Emails asked: | Hi: I created a new Task Form and need...

How to change fonts in drop down list
I created a drop down list in excel but the names appear too small to read on the drop down list and I can't figure out how to change these fonts Why are theydifferent than the actual cell the drop down list is in and How do I change this? If these are data validation dropdown lists, you can't change the font size. There are a couple of workarounds here: http://www.contextures.com/xlDataVal08.html#Larger Dennis wrote: > I created a drop down list in excel but the names appear too small to read on > the drop down list and I can't figure out how to change these fo...

Open Form Button
OL 2007 Can I add a button to the menu bar to open a specific form. Thanks What type of form? An Outlook form? -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. ALWAYS post your Outlook version. How to ask a question: http://support.microsoft.com/KB/555375 After furious head scratching, PapaFrank asked: | OL 2007 Can I add a button to the menu bar to open a specific form. | Thanks Sorry an Email Template .oft stored in userstemplates in file system. "Milly Staples [MVP - Outlook]" <what@ever> wrote in message news:OeV...

Product Price List in CRM
Hi all, I am new to CRM. Can someone point me in the right direction of creating a Product Price List in CRM please. We need this so we cab create quotes in the system. Many thanks. Kind Regards, John MCP. Home->Settings->Product Catalog. Start with discount lists, then unit groups, then price lists, then finally products. It's kind of wierd so good luck. BK "John Mallas" <john.mallas@electronicworkplace.com> wrote in message news:egYcT9JmDHA.1004@TK2MSFTNGP09.phx.gbl... > Hi all, > > I am new to CRM. > > Can someone point me in the right dire...

Subform of a subform?
Is there a way to create a two subforms (sub1 and sub2) on one main form, but have the second subform (sub2) actually be a subform of the first (sub1)? ...

Find record created in form load
There may be many thing wrong with this, so I apologize from the start. I have one form that builds the reference number, and I want to transfer that and other information to the Main Input Form, and then move to that record in the Main Input Form. Right now, the form opens to the first record. I have the following in the Form_Load event: Private Sub Form_Load() If Me.OpenArgs = 1 Then DoCmd.GoToRecord , , acNewRec [Issue Entry Date] = Now() Me.Issue_Reference_Number = Forms!frmnewissue_setup.Text5 Me.division = Forms!frmnewissue_setup.Combo3 ...

Subform with Macro
I have a form (frm_BinDetails), within this form I have a subform (frm_Cable). frm_Cable has a listbox (List23) which when the user clicks on an entry the contents of the first column of that listbox are displayed in a textbox (txt_ProcessID). The on click event of the listbox runs a macro with the following code Action = SetValue Item = [Forms]![frm_Cable]![txt_ProcessID] Expression = [Forms]![frm_Cable]![List23] When I run the form frm_Cable on its own the macro works correctly but when I try and run from frm_BinDetails then whenever I click on an entry an error message appears saying th...

Any way to see members of a public list using OWA, plus other snags?
Hello, We're using OWA 2003 as a short-term stop-gap solution for a few hundred users until we get the Outlook client rolled out. It's working fairly well but there are a few snags... - Anyone know if it's possible for an OWA user to see the members of a public distribution list? - Less seriously, is there a control-sequence to insert tabs into a message? Tried all the obvious ones! - IE doesn't allow users open even TXT files without saving them first, as if they were Level 2 attachments. How do we stop that behaviour? - Is the date format which the users can select in OW...

macros on a form
hi we have a workbook containing serveral worksheets each worksheet contains a lot of data we have split each worksheet into three pages for print purposes what we want to do is have a form containing drop down list of names we need each name to select and run a macro can this be done? thanks in advance kevin Kevin Carter Sigma Machining XL and VBA are capable of a lot. From the generic description of the problem, I would say yes. -- Regards, Tushar Mehta www.tushar-mehta.com Business solutions leveraging technology Microsoft Most Valuable Professional (MVP) 2000-2004 In art...

Removing a drop down list from a cell
How do I remove a down list from a cell? Click the Clear All button. -- HTH RP (remove nothere from the email address if mailing direct) "Cindy" <Cindy@discussions.microsoft.com> wrote in message news:F4F7D078-0FC2-4140-8035-A2D43FFCAC27@microsoft.com... > How do I remove a down list from a cell? Click on Data--->Validation Under the Settings Tab--> Field Allow = Any Value. That should solve it >-----Original Message----- >How do I remove a down list from a cell? >. > Sorry Bob, I am new to Excel spreadsheets. Where do I find the Clear all but...

SQL 2008 maintenance jobs randomly failing
Hello all, this is a repeat post. I originally posted about this on 11/10/2009 and though I was a hoping for the advertised 2 day MSDN response it's been almost 2 months, in fact it's even a new year (Happy new year!). If I'm posting in the wrong place or manner please let me know. Here it goes again.... I’m hoping someone here can shed some light on an issue I’m experiencing with SQL 2008. The short version of it is that my maintenance plans are intermittently failing. When I examine the SQL agent logs, the failing entries all contain the line: “Description: T...

opening a subform to a specific record?
Hey y'all, I've got a form that lists all the Students in a class and a link to "Edit Student Information" which opens a form to edit individual records. The link uses the same type of code generated by the form wizard and it automatically filters the records to the class. The next thing I want to do is to open the new form to exactly the record that was highlighted in the list. I can capture the list position from the subform (SelTop) and I found a method called "GoToRecord" that works like this to go to the 8th record: DoCmd.GoToRecord acDataForm, "Studen...

Printing a single record from a tab control subform
Hi I have created a Case Management Database of students. It consists of a main form and a subform. The main form consists of information that must be seen at all times. since it consists of information about each student. The subform consists of a tab control. There is a different subject on each page of the tab contol, e.g. General Information, Current Student Information, etc. I need to print out the mainform and subforms so I created reports for each subform in my tab control. I want to put a "Print" button on each page of my tabcontrol so that when cl...