Save Macro to save form data for database

Widya

New Member
Joined
Mar 3, 2002
Messages
2
Hello,

I have a problem in creating a form for databases. Every time I record a macro to save the data I've inputted in the form I have created into the database all the macro does is save the worksheet. It doesn't ask me if I want to update the current record, or create a new record, and looking at the database file confirms the fact that nothing has been written to the database. However, when I click on the save icon or file menu/save, it does ask me for those options.

I record the macro by clicking on file menu/save (whereupon it *does* ask me if I want to create a new record, but that doesn't reflect that in practice.) and then saving the macro.

Any advice will be appreciated. I am using Excel 2000.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
what database are you using, I don't exactly follow waht you are trying to do.
 
Upvote 0
not sure what the fix is yet but it sounds like you are tryin to use the "template wizard" add-in to add records to an Excel List. If this is the case it should update the record when the sheet is saved. Forget the macro for a minute. Does it update on a manual save of the form worksheet? If this is not what you are try to do then disregard this post...
 
Upvote 0
Ziggy: I am using MS Excel to create a form (using the template wizard) and associated database workbook (created by the wizard.)

Keith: It sounds like what you refer to as a 'record' is what I refer to as a 'field'. To me a record is the data inputted into a form and then saved in the database worksheet.

When I do a manual save (ie. click on the save icon or go to File Menu/Save) it does ask me if I want to update the current record or add a new record to the database. When I try using a 'save' macro that I have recorded all it does is save the form worksheet- it does not save any data I have inputted in the form worksheet into the database, nor does it give me any prompts (as outlined above.)

Widya Santoso
 
Upvote 0
I am having the same problem. I am putting together a "database" in Excel since my employer refuses to invest in Access.

I have designed an input template for the database (using the template wizard). Basically, I want to set up a macro (by pushing a control button)that will automatically update the database.

When I do the save MANUALLY it prompts me for the dialog box asking if I want to 1) update or 2) create a new record. However, when I try to autmote it (after recording the macro) it only SAVES. It does not prompt for how I want to handle the record and THEREFORE DOES NOT update the database. What gives? Any assistance would be of assistance. I can't imagine I'm the only person in the world that can't figure this out...can I?

Was this issue addressed and repaired in a service pack I have yet to download or something? Any help would be appreciated.

Thank you.
 
Upvote 0
Dim AdminPrinter As String
Dim OldPrinter As String
I had the same problem and sorted with the code below: hope it helps


Const File_DB = "COMMON"
Const File_ATW = "WZTEMPLT"
Set CurrWorkbook = ActiveWorkbook
CurrWorkbook.Activate
OldPrinter = Application.ActivePrinter
AdminPrinter = "\londonHP4600N-Admin-1 " & GetNode
Application.Run File_ATW & ".XLA!Commit"
SaveLocation = ""
 
Upvote 0

Forum statistics

Threads
1,214,551
Messages
6,120,161
Members
448,948
Latest member
spamiki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top