MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Apr 6th, 2002, 01:51 PM   #1
JeremyinCanada
New Member
 
Join Date: Apr 2002
Posts: 11
Default

I have designed an input template for an Excel database (using the template wizard). Basically, I want to set up a macro (by pushing a form 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. Has this been fixed with the add-in in Excel 2002?

I did a quick check on a couple of message boards and apaprently there is SOME code out there somewhere floating to fix this...and to force an update to the database. Been working on this since 4PM (2 hours) trying to find a solution....no luck thusfar.

Thank you.


[ This Message was edited by: JeremyinCanada on 2002-04-06 15:09 ]

[ This Message was edited by: JeremyinCanada on 2002-04-07 08:44 ]
JeremyinCanada is offline   Reply With Quote
Old Apr 6th, 2002, 04:34 PM   #2
Tom Schreiner
Board Regular
 
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
Default

Post your code...
Tom Schreiner is offline   Reply With Quote
Old Apr 6th, 2002, 04:46 PM   #3
JeremyinCanada
New Member
 
Join Date: Apr 2002
Posts: 11
Default

This is the code associated with the recorded MACRO:
Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 06/04/2002 by xxxxxxxx
'
'
ActiveWorkbook.Save
End Sub


As you can see, it is ONLY saving the file in the code. But, when I record the Macro I am actually selecting "update record to database" on another dialog box, but it doesn't actually record that action in the code. All the macro does is SAVE when in fact I need it to UPDATE AND SAVE. The MS website provides no help on this subject ( as far as I can tell).

I've used the Template Wizard "add-in" to develop the "template" sheets that upload to a database as information is saved. When I SAVE manually and choose "Update to database" it works fine. But, when I record with the macro, it doesn't record the update step.

Help?!?

JeremyinCanada is offline   Reply With Quote
Old Apr 6th, 2002, 04:47 PM   #4
JeremyinCanada
New Member
 
Join Date: Apr 2002
Posts: 11
Default

Also check out:

http://www.mrexcel.com/board/viewtop...1282&forum=2&4

Someone else is having the same problem...
JeremyinCanada is offline   Reply With Quote
Old Apr 6th, 2002, 05:24 PM   #5
JeremyinCanada
New Member
 
Join Date: Apr 2002
Posts: 11
Default

To get any idea of what I am talking about I woudl suggets putting together a quick spreadsheet/database using the Template Wizard.
Then create a macro designed to save the template and update the database. You will discover that the macro will ONLY save. It won't update the database workbook.
JeremyinCanada is offline   Reply With Quote
Old Apr 6th, 2002, 05:45 PM   #6
JeremyinCanada
New Member
 
Join Date: Apr 2002
Posts: 11
Default

Have also tried recording the macro using "save as..." and "close..." which also bring up the Dialog Box that allows you to place the record in the database.
No go!
It's as though the Macro doesn't "see" the dialog box that is associated with the Template Wizard with Data Tracking add-in.....very strange!
JeremyinCanada is offline   Reply With Quote
Old Apr 6th, 2002, 05:58 PM   #7
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

Hi Jeremy,

I have never used Excel in this way, but are you trying to grab the new data in the dialog box and then write it to the database?

Is is supposed to go straight to the database? Is it possible to write the fields to a temporary sheet (Sheet1 for instance) and then load it to the next available line in the database? I'm sure that doesn't handle amended records, but may be worth a shot.

Can you record a macro where you only update the database, but do not save? Possibly an intermediate step in between so the code gets generated.

How about the help files, any guidance there?

If I can, I'll try to play with this.

Regards,
Jay
Jay Petrulis is offline   Reply With Quote
Old Apr 6th, 2002, 06:06 PM   #8
JeremyinCanada
New Member
 
Join Date: Apr 2002
Posts: 11
Default

Hi Jay,

No - the data is in the worksheet. The dialog box simply gives you options on how you want to handle it.
No - there is no way to "update" without 1) saving 2) closing, etc. At least not that I have found.

I just sttarting fiddling with the workbook in VBA editor and noticed there was a 4th "hidden" sheet that has to do with the template wizard.

My suggestion, as before to get the hang of what is going on is to quickly make a very simply template/database using the wizard (it's an add-in).

See what you can come up with. Like I said before, it's like the macro doesn't see the dialog box when I am recording. And since there is no "alternate" means of updating the database....I have no idea. It might take a REAL wizard to figure this one out.

If it would simply record this for me, it would save me a HUGE headache.

Thanks.
Jeremy
JeremyinCanada is offline   Reply With Quote
Old Apr 6th, 2002, 06:07 PM   #9
JeremyinCanada
New Member
 
Join Date: Apr 2002
Posts: 11
Default

Oh yeah - no help with the help files either. Very very basic on that front...
JeremyinCanada is offline   Reply With Quote
Old Apr 6th, 2002, 07:42 PM   #10
JeremyinCanada
New Member
 
Join Date: Apr 2002
Posts: 11
Default

Starting fiddling with VBA editor, but I don't have enough experience with it. If you setup using the Template Wizard, I think you will be able to see the types of objects it creates and perhaps the modules it is acutally using to update to the master database. Once those are identified, it should be easy to make up a macro based on the code.

Still plugging away....4 hours later.
JeremyinCanada is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 07:38 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes