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

=Trim problem using the packaging wizard in XP developer edition

Status
Not open for further replies.

mlstewart

Instructor
Aug 20, 2004
58
US
I posted this question in a different forum yesterday but have had only one reply. I need help fast with this one so I am posting in here as well. I've included the only reply I've gotten as well.

I've created a database where I use the Trim feature quite a bit (especially in mailing address). Everything was working perfectly. I packaged the database with a run-time version of Access using the packaging wizard in the XP developer's edition. Now, it is like Access doesn't recognize Trim. I've got some text boxes on a form that use it and all that is displayed is "#Name?" and I also have some reports (record source is a query) where I use Trim and when I try to open one of the reports, it prompts me to enter a paramater value for Trim. These problems started when I packaged it with the run-time version. Can someone please helps me with this!! I don't know what to do. Everything worked perfectly before it was packaged.

Thanks,
ML

--------------------------------------------
REPLY
LittleSmudge (Programmer) Dec 3, 2004
I'm not an expert on 'packaging for run-time' but when I've come across those sorts of problems before ( VBA not recognising simple functions like Left, Trim, etc ) then it has been because a DLL library was missing from the list.

If Access can't find a DLL it seems to forget lots of other things besides ( The libraries that are lower than the missing one in the priority list. )


Are you sure that you linked in all of the necessary libraries when you made the package for run-time ?

G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.

---------------------------------------------

mlstewart (Instructor) Dec 3, 2004
No, I am not sure. That was my first time ever using it. Do you have any suggestions or advice?

Thanks,
ML

 
Are you distributing an mdb file or an mde?

In particular make sure that dao3.6 gets registered correctly on the target machine.

Have you added references other than the Access defaults to the application?
 
Currently I am distributing an mdb file because when I try to save it as an mde file I get a message saying that it can save the file as an mde. I haven't had time to fiddle with it to figure out the problem. I've got other security features set up so that the user can use the shift bypass as well as the other options.

Yes, I have added references other than the defaults. I've got a reference to another database that automatically resizes the forms on my database to fit the users screen resolution.

How do I make sure that dao3.6 gets registered correctly? I will not be present when the user does the initial install.
 
Yes, I have added references other than the defaults
You have to make sure the package will install them.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
The package is installing the the reference to the other database I was refering to. This is very new to me so I am learning.

Thanks
ML
 
You have to know why you can't create a mde.
Did the database compile properly ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That is my problem - it isn't compiling correctly. I haven't had time to set down with it to figure out what is wrong and try to fix it. I am a little confused because before compiling everything worked perfectly. But when I try to compile it get compile errors. I've got some time this weekend and I am going to see what I can figure out.

Thanks,
ML
 
Here is an example here:

This is the code for a button that closes the database. All I did was create the button and used the Macro builder for the OnClick property to create the Macro and the only thing in the macro is Quit which is set to exit.



Private Sub EXIT_DATABASE_Click()
On Error GoTo Err_Open_Form_Button_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Exit Database"
DoCmd.RunMacro stDocName, , , stLinkCriteria

Exit_EXIT_DATABASE_Click:
Exit Sub

Err_EXIT_DATABASE_Click:
MsgBox "You must enter a value for the activation code."
Resume Exit_EXIT_DATABASE_Click

End Sub



I am getting a compile error for the line:

DoCmd.RunMacro stDocName, , , stLinkCriteria



it highlights "RunMacro" and the compile error is:

"Wrong number of arguments or invalid property assignment"



Do you have any suggestions?

 
Double check your references:
menu Tools -> References ...
Try to remove all the references you can and retick them.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
It is wrong number of arguements. Looking in the help files, the RunMacro method can have only three arguements, you are trying to pass four.

If the issue is to close the database, replace the macro call with:

[tt]application.quit[/tt]

or have a look in the helpfiles on the RunMacro method of the Docmd object.

Roy-Vidar
 
RoyVidar,

I used your suggestion and it took care of the compile error. That must have been the only problem because I am not getting any compile errors at all now. However, when I try to save it as a MDE, I get the message "Microsoft Access was unable to create an MDE database. Any ideas on this one?

Thanks,
ML
 
Well, I fixed the =Trim problem I was having. I simply took Trim out.

Instead of typing
=Trim([StreetAddress]&", "&[City]&" "&[Zip])

I typed
=([StreetAddress]&", "&[City]&" "&[Zip])

and that is working perfectly now.

However, I still haven't figured out why I can't save the database as a MDE file.

Thanks,
ML
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top