Problem refreshing subform

I'm having problems refreshing a local table in a subform. After selecting a 
new customer on the main form, my code is supposed to delete the records in 
the subform and inserts the current customer's records for display . The odd 
thing is that when I insert a breakpoint and step through the code 
line-by-line, the subform displays the new records just as I intended. But 
when I remove the break point, the subform remains on the previous customer. 
What is it about executing the code line-by-line that causes the subform to 
behave differently?
0
Utf
5/28/2010 10:59:01 PM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
769 Views

Similar Articles

[PageSpeed] 39

"CDM" <CDM@discussions.microsoft.com> wrote

 > What is it about executing the code line-by-line
 > that causes the subform to behave differently

The code executed line-by-line gives up control to Access and Windows 
between each line, so events can occur.

As to your other problem, if you are displaying related tables and have used 
the LinkMasterFields and LinkChildFields to synchronize the Form with the 
Form in its Subform Control, I would not expect results such as you are 
seeing the contents of the Form in the Subform should automatically be 
synched when the record in the parent Form changes.

But, if your code must do something to reset the contents of the Subform, I 
couldn't address that without details of your data, how it's laid out in 
tables, how it's accessed, etc.. You, after all, have the database in front 
of you, but we are dependent on your description to be able to help.

-- 
Larry Linson, Microsoft Office Access MVP
Co-author: "Microsoft Access Small Business Solutions", published by Wiley
Access newsgroup support is alive and well in USENET 
comp.databases.ms-access


message news:4CAE824D-EFC8-4F97-9344-F1D690767EC2@microsoft.com...
> I'm having problems refreshing a local table in a subform. After selecting 
> a
> new customer on the main form, my code is supposed to delete the records 
> in
> the subform and inserts the current customer's records for display . The 
> odd
> thing is that when I insert a breakpoint and step through the code
> line-by-line, the subform displays the new records just as I intended. But
> when I remove the break point, the subform remains on the previous 
> customer.
? 


0
Larry
5/28/2010 11:14:24 PM
Larry Linson wrote:
> "CDM" <CDM@discussions.microsoft.com> wrote
>
>> What is it about executing the code line-by-line
>> that causes the subform to behave differently
>
> The code executed line-by-line gives up control to Access and Windows
> between each line, so events can occur.
>
Inserting DoEvents  should solve the problem. 


0
Mike
5/29/2010 4:12:40 AM
Reply:

Similar Artilces:

Problem when displaying a value
Hello, I am displaying a value in a textbox of a form (mytextbox.Caption = 14595" , and the result in display is : 1,4595E+04 Is there a way to force Access to display the value as 14595 and not as 1,4595E+04 ? Thank you. I'm confused. If this is a text box, it does not have a Caption property. Just set the Format property to: General Number of possible Fixed. If it is a label, try: MyLabel.Caption = Format(14595, "General Number") -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to g...

Problems with Windows 7 and email send stalling
When I send from my two computers running Windows 7 - one 32 bit one 64, If I have a very large text message or an attachment of any size (even a screen shot) the outgoing email message will stall. My old desktop computer running XP does not have this problem. Any ideas? Thanks in advance Richard On 6/7/2010 2:50 PM, Richard John wrote: > very large text message or an attachment of any size (even a screen > shot) the outgoing email message will stall It sounds like something's timing out. Do you have Thunderbird installed? If so you might give this a try: http...

physicalinventory problem
I am testing the physicalinventory feature in a test database, I have created a new physicalinventory and have it set to just manually enter items to the count screen. I have added one itemlookupcode to the count list with a count quantity of 60, which is the correct onhand quantity. Then I close the physical inventory screen for the time being, and go into POS and sell one of these items. Then I go back into manager and open up the physical count I just created, calculate it, and it tells me that the expected quantity is, not 59, but 58?? And that there is a variance of 2?? I am th...

Problem opening files in excel with a specific account
Hi. We have problmes opening a couple of files in excel, without any specific error message. The application just "hangs". When we log on to WXP as another user, the files work fine. We have re-installed excel, deleted and recreated the user profile which has problems, but still no luck. Anybody got a clue why this is happening? The computer excel is running on is a DELL Optiplex Pentium HyperThreading machine. Thansk in advance. Sometimes cleaning up the windows Temp folder will help. If that doesn't help, sometimes the file that contains the toolbar customizations...

File opening problem over network
I have what seems to be a strange excel file opening issue that I can't pinpoint and I would greatly appreciate any ideas to try for this problem. We have a network computer running windows 98 SE. On this computer there are many .xls files stored for users to access. Often when opening the files users get an error that reads: Microsoft Excel cannot open or save any more documents because there is not enough available memory or disk pace. -To make more memory available, close workbooks or programs you no longer need. -To free disk space, delete files you no longer need from the disk yo...

Problems with inserting Word doc in Excel
Hi, I am using MS Excel 2000 SR1. When I insert a Word document as an object in my worksheet (Insert->Object->Create from File), I notice that Excel imports only the first page of the document. Is there a way to overcome this problem ? Thanks and regards, Viral. Only the first page of an embedded Word object will be visible, and there's no way to change this setting. You could split the Word document into multiple files, and insert each one separately into Excel. Viral A wrote: > I am using MS Excel 2000 SR1. > > When I insert a Word document as an object in my w...

Excel printing problem
Excel (and Word) from Office X will not print documents with graphics=20 to HP LaserJet 4M and 4M-plus printers. The same graphics will print=20 separately from within Photoshop; and the Excel (or Word) documents=20 will print without the graphics. When a graphics-bearing Excel (or=20 Word) document tries to print, the printer's Ready light blinks, just as = it=20 should indicating the receipt of data, but no printing takes place. This would seem to indicate an inability of Excel (and Word) correctly = to=20 send the document as a PostScript file. yet the same mixed document=20 does pri...

Outlook 2007 install problem
when i tried to install outlook 2007 it hangs up and the end and will not complete. Task manager shows it running, but after 2 hours I ended the task. Now I can install or uninstall anything because I get a message that says something is installing and wait until it finishes. But, nothing is installing and Outlook 2007 does not show up on the program list. Help. If you are running an Anti-Virus program, like Norton or Trend, Turn it off while you do the install. Also, log out of any other programs that may be running. Are you using Microsoft XP as your processing system? Or maybe Vis...

Permission problem with public folder
Exchange 2000, Outlook 2000 (Office 2000) clients. Heres what happened: I exported the public folder to a pst file from the old Exchange 2000 server. Logged on as administrator on the new exchange server, I imported the file to the public folder on the new server. When I attempt to change information logged on as a user, I get the following error: "Your changes could not be saved because you don't have permission to modify some or all of the items in this folder. Do you want to save a copy of this item in the default folder fot the item?" I went into Outlook and set the ...

SelectSingleNode problem
Hi! The input xml file: <?xml version="1.0" encoding="utf-8" ?> <!-- Konfigur�ci� le�r�sa --> <Konfig xmlns:bk="urn:inifile"> <Konfiguracio> <szerver neve = "A1"></szerver> </Konfiguracio> </Konfig> XmlDocument xd = new XmlDocument(); xd.Load(Application.StartupPath + "\\Server.xml"); //Create an XmlNamespaceManager for resolving namespaces. XmlNamespaceManager nsmgr = new XmlNamespaceManager(xd.NameTable); nsmgr.AddNamespace("bk", "urn:inifile"); string xp = &quo...

Problems with Excel functions
I have a problem with the excel funtions. The problem is that when write a funtion as for example : = Replace(E2,12,16," ") what is displayed in the cell is the funtion that i wrote and not the result. I have been having this problem and i do not know if it's a setting on my program. Please help me on.....is URGENT... I need Excel working .... Thanks in advance Your cell was formatted as text before entering the function. Format as General and re-enter (F2, Enter) -- Kind regards, Niek Otten "RITRAM" <RITRAM@discussions.microsoft.com> wrote in message ...

Unable to deliver the message due to a recipient problem #4
Hi All, I am running Exchsrvr 5.5 SP4 with Post Sp4 fixes in installed. I have a user who sent an email to 4 recipients in the company and he got this error "Unable to deliver the message due to a recipient problem". None of the article in the knowledge base can help Anyone ever encountered this? Did any of them receive the message? Please post the complete NDR. -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "Vincez" <Vincez@discussions.microsoft.com> wrote in message news:AFF49776-E253-4469-9561-140824BDBC05@microso...

rpc over http problem
I'm having a problem connecting to my Exchange 2003 SBS at home from the office. I have it setup as per the instructions in KB833401. I have a Linksys Router/Gateway at home. I have Outlook setup as follows: ----------------------------- Exchange Server Settings Microsoft Exchange Server: mail.mydomain.com (alias, real server name is onyx.mydomain.com; I've tried both) Use Cached Exchange Mode (unchecked) User Name: my username ----------------------------- Exchange Proxy Settings https:// mail.mydomain.com (internet alias given by no-ip.com dynamic dns service) Basic Authe...

Problem with MDBVU32-Can't select MAPI profile
Hello, I try to open Exchange 5.5 SP4 IMC MTS-IN and MTS-OUT queues refering to MS KB165505. When I start the MDBVU32.EXE tool after creating a MAPI profile with PROFINST.EXE I don't have the possibility to select this MAPI profile to open the message store - has anybody also come across this problem ? Rstarting the Exchange server (NT4 SP6a) like explained in article KB165505 does not help - I can't select any MAPI profile within MDBVU32. Are there some hints or tricks to solve this ? Thanks and kind regards, Andreas Praedel praedel.andreas@oce.de Close any other MAPI ...

boot up problem
Using Windows XP Pro SP3 with MS Office When trying to start computer it goes to the screen to select safe mode; start from last working etc; or to start normally. Have tried all these and it still won't start properly. It gets the Windows page up as if loading and then drops out (no signal to monitor) and returns to this start screen again. When it does this there is a blue screen that is there for a very short time with writing. It is too fast to even get a chance to read it. I have a ASUS P4S800-MX motherboard. Is this a hardware problem. I have a video card and don&...

Excel 2007 VBA shape fill colour problem 02-11-10
I have a generic VBA routine that adds a specified shape to each cell within a target range on a worksheet and defines the Shape.Fill.ForeColor.SchemeColor property and the OnAction event. The OnAction event routine then toggles the Shape.Fill.Visible property on and off which should change the colour to the already defined Shape.Fill.ForeColor.SchemeColor property and back again, but the colour always defaults to turquoise rather than the colour I've specified. The code detailed below worked fine in Excel 2003, this appears to be a bug in 2007. --------------------------------...

Site ndr problem
Hello, I am running a mixed environment of Exchange 2003 and Exchange 5.5. I have one of my Exchange servers is working just fine the other can receive but it can't deliver internally. The failing machine is a Exchange 2003 the messages are just building up in the queue. I got back some exchange error #4.4.7 which are ndr's but I have to have something configured wrong. No messages anywhere, absolutely no help from the Exchange system that I can find. Thoughts on where I could start to look to start to trouble shoot. This server has just been added on line so no accounts on it ot...

recieving problem with the pop connector
on Small Buisiness Server 2003 with exchange im having a problem with incoming email from outside sources using a pop connector.. nothing gets thru and i get no error messages ... but with with email from "internal to internal" addresses and outgoing email to outside addresses both go thru fine... any ideas would be helpful thanks Justin wrote: > on Small Buisiness Server 2003 with exchange im having a problem with > incoming email from outside sources using a pop connector.. nothing > gets thru and i get no error messages ... but with with email from > "interna...

I'm having problems inserting text files from notepad
When I try to insert a text file created in notepad, which contains characters such as £, $ or letters with symbols over them, into a text box in Publisher 2003 it comes up with a File Conversion window, and the options to choose the Text encoding option. This didnt happen in our older version of Publisher, on our old PCs. We have new PC running Windows XP and Office Professional 2003 and I want to be able to insert the files without this window appearing. I have checked the registry and CharacterSet value is set to ANSI. Any suggestions on what is happening and how I can correct...

problem with WriteAttributeString
I try to write out some data to an xml file but it stopped with the message "An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll Additional information: Token StartAttribute in state Prolog would result in an invalid XML document." The code is as follow Sub writeXML(ByVal posted As String, ByVal messagetext As String, ByVal filename As String) Dim xmlTW As New XmlTextWriter("..\Watcherlog.xml", Nothing) With xmlTW .WriteStartDocument() .Formatting = Formatting.Indented ...

Problem with Workgroup Templates policy
I have a domain group policy confiugred to specify workgroup templates. It seems to work fine except on our remote workstations where "domain users" are in the local "power users" group instead of the local "administrators" group. On these remote workstations, the policy won't update their user registry key: Value: SharedTemplates [HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\11.0\Common\General] This only works if they are in the local admin group. Shouldn't it work if they are power users? It also doesn't work if I just run a *.reg...

outlook attachment problem #3
Dear all, Our company had upgraded to Win server 08 & exchange 07 last year. Some of the Outlook user have the attachment problem, many file is pdf & xls. Some of the pdf and xls file is OK and some have the problem. We try to open it directly in the email, the pdf file is damage & the xls file is blank sheet. We save the file on desktop first and then open, same problem and it show the file size is 0 kb. We also try to open in outlook web access, it can open directly and no problem. This problem also occur on outlook 03 pc and outlook 07, but some of the pc using outlook 03 ...

Email Problems In Outlook 2000XP
I recently hooked up to a DSL through my local phone company (CenturyTel). I am using the latest greatest OutlookXP (SP2) and I am still having problems receiving email. The only way I can get it is by using the Send/Receive function. I don't have any problems sending email. When I use Outlook Express, I have no problems. Any ideas? Thanks! Have you set up your send/receive groups in View | Send/Receive Settings | Define Send/Receive Groups? -- Jocelyn Fiorello MVP - Outlook *** Replies sent to my e-mail address will probably not be answered -- please reply only to the newsgr...

Edit problem in Outlook 2000
Windows XP, Outlook 2000. When I reply to a message and compose some text, I have no problems. But, when I attempt to edit any of the text contained in the original message, and press the space bar or any of the alphameric keys, my name is immediately inserted like this: [Bob]. For example, if I received the above paragraph in an email and then replied to it, and tried to insert a space between "Windows XP" and the ",", what would appear is: Windows XP [Bob] . Why does Outlook do this and how do I stop it? Outlook does it because you told it to. You have co...

Problems printing from IE8
Windows 7 + Office 2007 running on an SBS 2008 over G-LaN We have deployed 14 workstations all with identical installs, updates & permission sets, yet 2 of the workstations refuse to print web pages containing Java…. I have in stalled the latest Java on all workstations & all are printing as required but two of them will not print from Sage Pay & City Link when reports are required…. The staff are going grey…. Can you help me please? The first thing I'd try is running IE in "no add-on" mode. If that works, you can enable add-ons one at a time until...