Previous in Forum: Scheduling n jobs on m machines software   Next in Forum: OPC Software Trigger for DATA Control
Close
Close
Close
9 comments
Rate Comments: Nested
Active Contributor

Join Date: Oct 2007
Posts: 24
Good Answers: 1

Microsoft Access problem

02/11/2008 1:14 PM

Here I am again with another Microsoft Access problem. Solved the previous one with CR4 help - how about this? I built a database years ago, & the command button wizard worked great. I build a database today, & the command button wizard works great. But a database I built last year cannot make a command button work (wizard or no) unless I attach a macro. The wizard seems to work, until I return to form view, depress the command button, and NOTHING happens. Why? Have I unknowingly turned off a switch that keeps a command button from running when established by the command button wizard? Any suggestions?

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Commentator

Join Date: Sep 2006
Location: Troy, NY
Posts: 86
Good Answers: 5
#1

Re: Microsoft Access problem

02/11/2008 1:53 PM

Have you checked the _Click() event for the button?
Go into editor mode, and double-click the button; this should open up a VBA window, and show you the function that is called when you click the button (like cmdButton1_Click(...)).

Is there any code here? If not, you can just call your macro by typing something like this: Call Macro1()

Except use you own macro name, of course.

Register to Reply Score 1 for Good Answer
Active Contributor

Join Date: Oct 2007
Posts: 24
Good Answers: 1
#2
In reply to #1

Re: Microsoft Access problem

02/11/2008 2:30 PM

When I build a macro & attach it the command button, go to Properties, OnClick - there is the macro under the name I gave it - when I use the wizard, go to Properties, OnClick shows an Event Procedure, & when I go to that, the macro is identical to the first macro - except the one built with the wizard merely depresses when selected in form view - it doesn't run the macro. I'm talking simply macros, like Print Report, or Find Record. The macro built with the wizard is there, attached to the button, but it just won't run. The one built without the wizard is identical, but it runs. Suggestions?

Register to Reply
Guru

Join Date: Jul 2006
Location: Silicon Valley
Posts: 5356
Good Answers: 50
#3
In reply to #1

Re: Microsoft Access problem

02/12/2008 1:52 AM

A good answer,coonj. I will truly miss you when your wife eats your head.

__________________
"Perplexity is the beginning of dementia" - Professor Coriolus
Register to Reply Off Topic (Score 5)
Anonymous Poster
#4

Re: Microsoft Access problem

02/12/2008 7:28 AM

did you happen to rename the command button after connecting the macro the first time. access will not update the connection if you rename the command button.

Register to Reply
Active Contributor

Join Date: Oct 2007
Posts: 24
Good Answers: 1
#5
In reply to #4

Re: Microsoft Access problem

02/12/2008 7:43 AM

No - no renaming involved. In design view, I click on the command button on the toolbox, draw the button on the form making sure the wizard button is depressed, and I get the "Command Button Wizard" popup - then I select one from column A, like Record Navigation, and one from column B, like Find Record, select Next, select the picture for the button, accept the name, or create a new one - doesn't matter - then Finish, return to Form view, click the button, it depresses, but nothing then happens. Like I said in my initial question, it's as if I have unknowingly turned off a switch that prevents all wizard created buttons from running.

Register to Reply
Member

Join Date: Jun 2007
Location: Minnesota
Posts: 7
#6

Re: Microsoft Access problem

02/12/2008 9:01 AM

To build better Access DB's try to avoid wizards. They work OK for very simple applications but make it very difficult to change things. Also, using macros for every command button can get very confusing as well. If you have many forms and buttons you can end up with hundreds of macros. I suggest using the code builder in the "On Click" property. It is very simple once you know how it works. All macros are docmd for example docmd.opentable "table name". Or docmd.gotorecord. VBA will pop up choices to help you along. It is a little more difficult at first but ends with much more flexible databases that are very easy to follow and troubleshoot. I'm sure a little google search would help you with the docmd's.

Register to Reply Score 1 for Good Answer
Active Contributor

Join Date: Oct 2007
Posts: 24
Good Answers: 1
#7
In reply to #6

Re: Microsoft Access problem

02/12/2008 9:55 AM

I appreciate what you say - I have done some vba applications - but that still doesn't answer the question - why does it work in one database & not another?

Register to Reply
Guru
United States - US - Statue of Liberty - New Member Hobbies - Fishing - New Member

Join Date: Nov 2007
Location: Gone to Alabama with my banjo on my knee...
Posts: 5595
Good Answers: 20
#8
In reply to #7

Re: Microsoft Access problem

02/12/2008 12:00 PM

Another undocumented feature brought to you by the MiniSquishy code writers. Great at creating applications that they never use, have no idea what we who do use them want, so they are only half-fast...

__________________
Veni, vidi, video - I came, I saw, I got it on film.
Register to Reply Off Topic (Score 5)
Guru

Join Date: Jul 2006
Location: Silicon Valley
Posts: 5356
Good Answers: 50
#9

Re: Microsoft Access problem

02/14/2008 2:48 AM

Why don't you just admit it... Windows is just too sophisticated for you. Go back to Linux.

__________________
"Perplexity is the beginning of dementia" - Professor Coriolus
Register to Reply
Register to Reply 9 comments

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

Anonymous Poster (1); coonj (1); EnviroMan (1); majordud (3); msquire311 (1); vermin (2)

Previous in Forum: Scheduling n jobs on m machines software   Next in Forum: OPC Software Trigger for DATA Control

Advertisement