Excellent mate worked a treat, thanks alot.
I hear you about inheriting other people's code; I wanted a quick fix to the few problems this program had and it's made more difficult by not knowing the code at all when it's not your own. The database itself is actually generated and updated by yet...
Right i've discovered a problem hehe. This isn't my code so after further investigation the variable that passDateToQueryField.Text is attached to is actually not a date - it's a String. The reason for this is the database has dates stored in the format 20041201170123. This means that it's 1st...
Hi all.
I found a problem with my code and realised that the SQL statement...
rs.Open "SELECT Name, S, Time, Tid FROM TstArchive WHERE [Time] BETWEEN '" & passDateToQueryField.Text & "%' AND '" & passDateToQueryField2.Text & "%' ORDER BY Name ASC", db, adLockOptimistic
...does not...
Yeah ive had this problem loads, but I didnt create the database you see. It's a database that's populated by some other software and i'm simply writing a program that creates statistics from it.
Cheers for the help.
M.
...db, adLockOptimistic
The passDateToQueryField Text boxes contain dates in the format: 20040924, thus i'm looking through the database for 20040924* strings (The full strings have a time inc seconds on the end: 20040924231401).
This has worked fine in the past however I now want to say...
I'd like to hijack this thread slightly because i'm looking for something similar.
I have two calendars, which I want to pass the dates into an SQL query. I want to do this in a loop, from the first date selected, for every day till the date selected in calendar 2. I'm pretty sure I need to use...
Could it be that the error in your original code is due to no records being found? If this is the case, the code will skip the While statement because rs.EOF is true (Skipping the Msgbox), then it will consequently crash on the rs.MoveLast statement because it's not included in any sort of...
Because the current code is like so:
-----------------
Private Sub Button_CLick
form.show / label.Caption = "Working" (Ive tried both)
Do the code
form.Hide / label.CAption = "Done."
End Sub
-----------------
In both cases, the form is either not drawn properly (IE it has labels...
...is always variable. For example, this is a set of queries that happen when one particular button is pressed:
================
rs.Open "SELECT * FROM table", db1, adOpenDynamic
While Not rs.EOF
var = rs!tableHeader
rs2.Open "SELECT * FROM table2 WHERE tableHeader2 = var ", db2...
No the queries are only found when either the user clicks a button or drops down a combo box and makes a selection. The user may not always wish to run the same query so putting it in form load would waste alot of the user's time - especially considering there's around 1.2 million records...
Hi guys.
I have a program that does alot of SQL cycles and can take as long as 40 seconds to load in all the relevant data. At the moment, a form appears to show that the program is working (And taking up all of the CPU power), and disappears when the cycles have finished. However the forms are...
...Below is the code, sorry but it's quite complex:
=========
Code
=========
Set rs3 = New ADODB.Recordset
rs3.Open "SELECT * FROM Par WHERE Time LIKE '" & passDateToQueryField.Text & "%' ORDER BY Serial ASC", db2, adLockOptimistic
badBoard = False
While...
That's brilliant mate thankyou.
I would try to stay away fro mreserved names but unfortunately another piece of software not written by me makes the database and populates it with data. Also you may have noticed that the time data is backwards too hehe, the date that is 23/06/2000 gets stored...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.