Welcome to Dream.In.Code
Become a VB Expert!

Join 149,447 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,186 people online right now. Registration is fast and FREE... Join Now!




VB Code works only when I tsep through it

 
Reply to this topicStart new topic

VB Code works only when I tsep through it

easy_geeza98
16 Nov, 2007 - 06:10 AM
Post #1

New D.I.C Head
*

Joined: 16 Nov, 2007
Posts: 1


My Contributions
Hi Folks
Iam a newbee to the forum and am having a few problems with VB in Access. Have any of you seen this before??

I have two subforms based on separate queries. I use a mixture of SQL to manipulate the tables Iam dealing with...no heres the strange part. All my VB code works perfectly fine and does exactly what it should do when a breakpoint it and step thorugh it line by line. I can see the changes happening in the forms as I step through...However when I run it normally without seeing the step throughs it wont update the forms on the refresh event. Its as though it skips it out. I have tried everythng now but cant see why it would work fine in step through mode and not normally. Any ideas or help would be much appreciated?

I have compacted and repaired the database thinking it could be something to do with that but still does the same

Thanks in advance

User is offlineProfile CardPM
+Quote Post

MRJ
RE: VB Code Works Only When I Tsep Through It
18 Nov, 2007 - 05:59 AM
Post #2

D.I.C Head
Group Icon

Joined: 13 Oct, 2007
Posts: 84



Thanked: 1 times
My Contributions
I have seen it before. but It was quite a while ago and can't remember what I did to fix it. But...

Have you tried putting in 'Debug.Print' into your code and see if you see it in the debug window?

Or using Message boxes to see if it's actually running?
User is offlineProfile CardPM
+Quote Post

William_Wilson
RE: VB Code Works Only When I Tsep Through It
18 Nov, 2007 - 06:55 AM
Post #3

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 4,101



Thanked: 25 times
Dream Kudos: 3275
Expert In: Java, C, Javascript

My Contributions
Sounds like a timing issue. I have not used Access in VB, but if it works stepping through, likely there are commands running too quickly, and not waiting for a reply from the database. I have had this problem with MySQL in different languages, you may want to try tossing in a couple of delays around queries or slow down any loops a little and see if that has any affect.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 12:52PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month