Unless you are using SQL server, you'll need to run an update query to update the NextYear field after each new date record is added.
If using SQL server, you can set a trigger on the table to do the same thing.
-Poop
I recently overcame a similar issue by modifying the sql string property of the querydef in code - something like this...
Dim strSQL As String
Dim intRecords As Integer
intRecords = InputBox("How Many Records Do You Want?", "Answer The Question")
strSQL =...
Try something like this. StartDate and EndDate are whatever date you want to choose...
SELECT * FROM MyTable WHERE DateField >= #StartDate# AND DateField <= #EndDate#
Good Luck,
Poop
I'm not sure if the iSeries is similar to MS SQL Server, so if not, please disregard. If possible, try to set a trigger on the table so when new records are added, the trigger will reiview them and decide to keep them or delete them.
For what it's worth,
Poop
If there is an ID on the table (a date would work, too) try to build a query on a query. First query (q1) would look like:
SELECT Max(MyTable.Field1) AS NewRecord
FROM MyTable;
Second query (q2) would look like:
SELECT MyTable.*
FROM q1 INNER JOIN MyTable ON q1.NewRecord = MyTable.Field1...
I've been experiencing the same issue when distributing apps to other PCs. I bet you're missing mscomct2.ocx or mscomctl.ocx. Make sure these are installed on each of the computers you are distributing your app to.
You can be certain which dll/ocx may be missing by opening the code window...
Try formatting the date field you are searching for and the date criteria in the where clause. I also have the same annoying problem at one of my jobs (dates in text format). One thing I've found very helpful is to format the dates with the year first, then month, then day. This makes sorting...
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.