Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate a Query w/A Function

Status
Not open for further replies.

CptTom

Programmer
Jul 16, 2001
117
US
I wrote a function to convert a Julien Date (yyddd) to a true date format. The function runs and can be seen in the immediate window of the VB screen, but does not display in the query spreadsheet.

Can this be done?

Larry
 
If you look at the SQL view of the query, does it look something like:

SELECT ConvertDateFunction(MyTable.TheDate)
FROM MyTable; Terry M. Hoey
 
Listed below. The function call is JulienToDate(strJulien) where the ALVO3PDP.Date is a text field. Ex. 01340 is today, 12/6/2001.

SELECT ALV03PDP.Rec, ALV03PDP.UIC, ALV03PDP.LIN, ALV03PDP.PBIC, ALV03PDP.Rpt, ALV03PDP.NSN, ALV03PDP.SerNo_RegNo, ALV03PDP.Rec_Auth, ALV03PDP.Class, ALV03PDP.Fld1, ALV03PDP.UI, ALV03PDP.Date, JulienToDate([Date]) AS Date2, ALV03PDP.Req, ALV03PDP.Auth, ALV03PDP.Fld3, ALV03PDP.OH
FROM ALV03PDP
WHERE (((ALV03PDP.Rpt)=1));

Larry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top