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

saving a form as .frm

Status
Not open for further replies.

manojEP

Programmer
Dec 17, 2003
9
0
0
IN
hi there,

I am developing a project that generates a form dynamically based on users request. Form and controls are generated smoothly. But while saving,my commanddialog1.showsave does not work.

I need to save the form as ".frm" in the user desired location? How to do that??

expecting solution as early....

thnx

With regards,
manojEP
 
You can't save an Access form separately like you can in VB. All you can do is export it to another Access database. Sorry to be the bearer of bad tidings! Good Luck!

Have a great day!

j2consulting@yahoo.com
 
hi SBendBuckeye,

Thnx for your reply. But in my case, I am designing a form that dynamically generates and displays controls(text boxes and combos) for the fields that a user has selected in the fieldlist of a table.
After generation of these controls, the form is handed over to the user (this is similar to a wizard)... The user needs to save this form in the name what he wants, so that he can make use of it in his project, rearrange the controls order, give different names to the controls etc.

Now tell me, how to enable the user to save this form at his required location??? commanddialog1.showsave does not work.....

exp. reply...
advncd thnx...

with regards,
manojEP
 
Hello manoEP,

I'm still not exactly sure what you are asking. This is a VBA forum, not a VB forum. In VB, you can save a user form with a .frm extension. If you are using VB, you may want to post your question on the Visual Basic(Microsoft): Version 5 & 6 Forum forum222.

If you are still here and doing this in VBA, then I am assuming you are using code something like the following to create your form and various controls:

Sub CreateFormAndControls()
Dim strFormName As String
With CurrentProject.Application
.CreateForm
strFormName = .Forms(.Forms.Count - 1).Name
.CreateControl strFormName, acCheckBox
End With
DoCmd.Close acForm, strFormName, acSaveYes
End Sub

So at this point, you have created and saved a form in the current project with the properties you want. I believe what you need to do is to create an empty database with the name your user requested. Then export your newly created file to their database and delete it from your current project so the process can be started over if desired.

Good Luck!

Have a great day!

j2consulting@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top