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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

works on my computer but not my Clients

Status
Not open for further replies.

rewdee

Programmer
Aug 17, 2001
295
US
I have a append query that includes the Str function that works on my computer but not on my clients: The query is:
Code:
INSERT INTO tblPhoenix ( Location, ItemNumber, Description, SerialNumber, Lot, ExpirationDate, Selected )
SELECT [Inventory].[Location], [Inventory].[ItemNumber] AS [Item Number], [LookupItem].[Description], [Inventory].[SerialNumber] AS [Serial #], [Inventory].[Lot], str([Inventory].[ExpirationDate]), true
FROM Inventory INNER JOIN LookupItem ON [Inventory].[ItemNumber]=[LookupItem].[ItemNumber];
How come the Str function works on my computer but not the clients?

I have a similiar problem in a report too. The controlSource of this report is:
Code:
=IIf(Trim$([SerialNumber])="---","N/A",[SerialNumber])
On my desktop this works, however on my clients the #error comes up. Anyone know why? The client and I have Access 2000 (9.0.2720).

As a collolary to this, how do I get the OnFormat code to work? I tried:
Code:
Me.txtSerial = IIf(Trim$([SerialNumber])="---","N/A",[SerialNumber])
I keep getting value cannot be assigned to txtSerialNumber.

Thanks

Bill Nielsen
Programmer/Systems Analyst
 
You need to check that the object file references on the client pc match those on yours.
(In any module in design view Tools>References).

In reports you need to use ! not . for controls.
 
If trim and str functions are not working on your clients machines it is likely there is a missing reference

on your clients machine open the db and open a module any will do, go to Tools/references scroll down and look for missing reference, uncheck the box, ensure the visual basic for applications library is checked.
 
What is the error relating to the str function? You're invoking it on something that looks like a date field, if so, you might have som problems relating to the date format/regional settings on that machine. What happens if you drop the str function?

Roy-Vidar
 
Thanks for all the replies.

I figured out how to get the report working. I had to take the control source blank and added a non-visible field blank and then run this code:
Code:
Me.txtSerialNumber = IIf(Trim$([SerialNumber]) = "---", "N/A", [SerialNumber])
Now if I could get the Str function to work properly. Here's the error message that I'm getting :
3075 -- Function is not available in expressions in query expression Str([Inventory].[ExpressionDate])

My Client is in a different time zone so I can't check his references for another couple of hours. However, I can't see this being the problem as I'm sure the Visual Basic library is checked because the client wouldn't even get that far if it wasn't.

Thanks

Bill Nielsen
Programmer/Systems Analyst
 
Depending of the version of JetSQL you may consider do a google search for sandbox jet sql

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top