Quick Question Mike. In the criteria match in the SQL you've added should the criteria match be something general so that all TimeIn values from the table are selected? Or, do I need a unique identifier here cuz if so there wouldn't be one.
MatChew
codename: vba4dumbE
I'm not completely sure of your question but from what I understand... Is REPID the key in either table? And if so, could changing this may help.
MatChew
codename: vba4dumbE
To be specific, I need to refer to two times (TimeIn and TimeOut). Since, the calculation I need to make is only for reporting purposes I suppose I can refer to the time values in my table. Therefore, if TimeOut of the current record minus TimeIn of the previous record is less than 30 then...
I am trying to refer to a previous row in a table to compare two times (time1 and time2). Is there a way of referring to time1 after dealing with time2 in vb so that I can get the difference between the two times? Any help anyone can provide is much appreciated.
MatChew
codename: vba4dumbE
Golom,
From what I've heard, DAO is oldschool and out of date. I've used ADO so I suppose I would use ADO here. Or is there a way to simply refer to a previous row in a table without using recordsets? I appreciate your help.
MatChew
codename: vba4dumbE
When using recordsets is it possible to refer to a previous recordset (a previous record in your data table) and make a calculation on two numbers, each number being from a seperate record in the table?
MatChew
codename: vba4dumbE
Sorry if this was still too vague the column FuelWord contains all [b]blank [/] fields. I need them filled with either Gasoline or Diesel depending on if colum FuelType is a "1" or "2"
codename: vba4dumbE
That did not work for me. I still got back all values of "Gasoline" in the table column FuelWord. Just to clarify dpav29, I am trying to update the fields in a column with either the word Gasoline or Diesel based on the value of another field in a different column in the same table.
Gasoline =...
I am trying to update fields in a column called FuelWord with the word "Gasoline" or "Diesel" based on the value of another field in the same record, FuelType which has a value of "1" or "2". This is the SQL I have tried:
UPDATE tbl_FuelUsage SET tbl_FuelUsage.FuelWord = "Gasoline"
WHERE...
Thank you very much misscrf! This db will be very helpful. I figured out what I needed. I had to account for the "0" in "tblRouteLog Query". I changed the SQL to:
SELECT [tblRouteLog].[Log_ID], [tblRouteLog].[Date], [tblRouteLog].[Equipment Number]... FROM tblRouteLog WHERE...
Also, I would like to use "<All Trucks>" instead of "0". I replaced the 0 with All Trucks in both SQLs however, I get a data type mismatch error when I click cmdmakereport. The Equipment Number is of data type Number. I tried to change it but it says it cannot be changed as "it is part of one or...
Tek-Tips has officially become my favorite forum, no, my favorite website. DoubleD, PHV... I love you both! Thank you so much for the help.
MatChew
codename: vba4dumbE
I'm not sure how to send a private message on here. I don't have a web host to save screen shots of my db table and forms either. Guess I'm just doomed!?!
codename: vba4dumbE
I didn't start this db but I believe the make table query was used in conjuncton with an option to export the data to excel. The SQL for the qry_MakeRouteTable is...
SELECT [tblRouteLog Query].* INTO tblrpt_RouteLog
FROM [tblRouteLog Query];
So all the queried data ends up in "tblrpt_RouteLog"...
I'm not sure what you mean. The user can choose the Date and Equipment number on the form which produces the report. I am having a lot of trouble with this one and if you know an easier way to do what I'm trying to accomplish, please do share. Many thanks in advance.
MatChew
codename: vba4dumbE
I don't want to simply copy tblRouteLog. I want to query those records that apply to what is chosen in the two combo boxes on my form. I checked to make sure applicable records exist before chosing a date and equipment number. It works fine for choosing one equipment number for a single date...
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.