format function not working

hoonose
06-06-2003, 12:54 AM
I have developed a simple program which is working fine on my pc but when i install it on another pc the format function does not seem to be working. An input box comes up 'Enter parameter value' Format
I have checked the file msvbvm60.dll is in the system32 folder and registered it manually by regsvr32 "c:\winnt\system32\msvbvm60.dll" and it said it was successful but format function still not working.

this is my code
If Me.txtDateTo = "" Then
sCriteria = "[RptDate] = #" & Format(Me.txtDateFrom, "mm/dd/yyyy") & "# and [Dept]='" & Me.Combo1 & "'"
Else
sCriteria = "[RptDate] between #" & Format(Me.txtDateFrom, "mm/dd/yyyy") & "# and #" & Format(Me.txtDateTo, "mm/dd/yyyy") & "# and [Dept]='" & Me.Combo1 & "'"
End If

what else do i need to do???? :confused:

Flyguy
06-06-2003, 01:34 AM
Looks like you are building a SQL query.
Are you using ADO?
In that case you would also have to install MDAC_TYP.EXE on the target machine.

hoonose
06-06-2003, 01:45 AM
i tried installing MDAC_TYP.EXE think is ver 2.7 sp1 and it had no effect

i have just checked the format function in an access query and it seems to be working fine. Why would it be working in access but not in my program?

Flyguy
06-06-2003, 05:17 AM
What is the error message you get?

hoonose
06-06-2003, 07:40 AM
I do not get an error message I get an input box titled 'Enter parameter value' asking for 'Format'. Like when you put a variable in a query criteria and it pops up and asks you the value each time you run the query. It seems it is just not recognising format as a function it is treating it as a variable but I dont know what I have done wrong. Do I have to somehow tell it that Format is a function?

Flyguy
06-06-2003, 03:21 PM
I think that's because you have all these [] square brackets around your field names.

hoonose
06-06-2003, 05:38 PM
I think that's because you have all these [] square brackets around your field names.

OK will try it without them when back at work,thanks.

hoonose
06-10-2003, 03:20 AM
Thank you for your help with this.
I have tried your suggestions and more, checked is updated to sp3 and nothing seems to work. I have successfully installed and ran the program on other pcs today and everything works perfectly so it seems to be just that specific pc. Am going to reinstall office and mdac and sp3 on the affected pc and hopefully it will do the trick.

:-\

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum