![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2005
Posts: 3
Rep Power: 0
![]() |
I have an application in which I am populating text boxes in a form by way of a query from a table. If I run the application without breakpoints/stepthroughs it doesn't populate all the fields. If I run it with breakpoints/stepthroughs it works like a charm. Any help would be appreciated! Thanks!
|
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
You need to fix it. That's about the only response supportable by the information you give. If you haven't yet read a "How to Post a Question...." thread, or the forum's rules/FAQ/guidelines, that would be a nice step.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Oct 2005
Posts: 3
Rep Power: 0
![]() |
Here is the section of code that is causing my problem:
strSQL = "Select * from qryfrmProcessInvoices_Lookup WHERE Invoice_Number=" & lngInvoice_Number Set rsTemp = CurrentDb.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges) If rsTemp.RecordCount > 0 Then rsTemp.MoveFirst If rsTemp![PostedInd].Value = False Then Me.txtAddInvoice_Date = rsTemp![Invoice_Date] Me.txtAddProject_Cntr = rsTemp![Project_Cntr] Me.txtAddJob_Nmbr = Nz(rsTemp![Job_Nmbr], "") Me.txtAddSidemark = Nz(rsTemp![Sidemark], "") Me.txtAddSalesperson_UserID = Nz(rsTemp![Salesperson_UserID], "") End If rsTemp.Close End If the app knows what information is in the recordset but without placing a breakpoint in the code it doesn't populate the text boxes. If any other information is needed, let me know and I'll post it here. Thanks. |
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Unless there's a temporal issue, and it seems unlikely that you would be the first to discover it, something must be happening when the debugger stops the process. Why don't you insert some statements to output the values of important variables to a log (or other output device) so that you can see what path the various tests are causing to be taken. Message boxes, requiring a response, would also generate a temporal delay and cause it to "work" if it's truly a temporal thing. Generally speaking, your variables hold the key to what's going on.
In your perusal of my suggested references, you seem to have missed the one regarding putting tags around your code to preserve its formatting. Try it, you'll like it.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Oct 2005
Posts: 3
Rep Power: 0
![]() |
Thanks for the response. I had used the messages boxes prior to the post, and it didn't make it "work". However, I found that doing a requery to the text boxes after the code posted did fix the problem. So if anyone else has this problem, that seems to be the fix! Thanks again for your input DaWei.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|