Picture vs Command Button Events XP

Sorrells

Registered User.
Local time
Today, 07:45
Joined
Jan 13, 2001
Messages
258
Hello,

In AccessXP, I have a form for entering contact/address information. There is a check for required fields. I recently changed all of my command navigation buttons from command to picture graphics. Although both have OnClick and OnDblClick, they behave differently on the form.

If the user attempts to leave the form with a required field incomplete, VBA code notifies the user and returns to the form in the incompleted textbox with both buttons.

If the box is then completed, the command button recognizes it but the picture does not. The code is exactly the same behind both controls.

I do not understand this. I reckon I best return to the Command Button but this really bothers me. Has anyone else run across this?
 
I didn't say why I would make a change from a command button to a picture. The reason is the behavior I am seeing now using the command button again.

Although I have code behind the OnDblClick to call OnClick, I can double click on the command button and it advances me 2 forms. Not cool. The picture graphic does not recognize the double click according to Access Help (although the event is available in the picture properties).

Thus I went to the picture to make a run around a command button problem and got into another fix with the picture events.

Now I am in a pickle!
 
Guess, I've stumbled twice. If I click fast enough, I can move forward with the picture button two forms as well with a double click.

The intent is to make all buttons single click. Is there a way to disable the double click event for the program?
 
No, that won't work, I need the double click in a couple of situations on down the road. How about disabling double click in this form only. Is this possible?
 
=> Access97 Help says only a command button recognizes a double click
=> But a graphic (picture) does also
=> I can find no way to disable the double click
=> Sending a double click to the single click event helps not at all
=> Best work-around so far is to make sure no navigation buttons are located in the same spot on each form. Then the 2nd click has no effect

I am not happy with the above. Sure seems like there should be a better way!
 
I had reformatted the hard drive, re-installed WinXP then OfficeXP with the current Service Packs. All of this went very well.

The picture object still does not respond to changes made in the form as noted in my initial post. If my code sends the user back to complete a txtBox and it is completed, the picture object does not recognize the change but a command button does. Not impressive, but what can a guy do? Deal with the reality!
 
Why not post your database up here? I am having trouble understanding the problem after reading all your posts.
 
Ifstar,

Thank you for responding! Unfortunately, this program is close to 31MB in size. I apologize for the lack of clarity. Let me try again.

My initial problem was with navigation buttons (Back - Next) I have placed on the lower left and right of the forms in the program. I had them all set to double click events but my client wants them single click. I made the change but found 2 single clicks opened both the next form then the form after that.

After a lot of time and frustrating coding attempts, I found this 'nugget' of information under Access97 Help topic 'Double Clicking': "If you double-click any control besides a command button, the second click doesn't occur."

I had added a graphic to the command buttons so that they look like navigation buttons but with this information, I looked closer at the picture object properties. There I found OnClick and OnDblClick. (Why the second considering the Help statement above, I don't know.).

I changed the buttons over to pictures copying the code as well. I then made 2 disturbing discoveries. The first was on a form where the code behind the Next button checks for required fields. The code would trap an incomplete field and send the user back to it. But when the user completed the field then attempted to use the button again, it still said the field was incomplete. It was not picking up on the action. I then added a command button beside it and found that the command button functioned just fine, but the picture button failed in this respect.

The 2nd thing I discovered was that quite logically, the picture button did respond to a double click, taking the user forward 2 forms. Back to square one again.

I attempted several coding methods to overcome this but have failed every time. Reformatted the computer! At this point I've got the problem contained by offsetting the buttons so that they do not directly overlap in succeeding forms. In this way the 2nd click of a double click gets dissipated and is not a hassle but the forms are not as standard as I would have liked.

An example is forthcoming.
 
Try compacting your db then zipping it. That should shrink the size considerably.
 
OK, I've attached a rather kludgy zipped copy to demonstrate the action I am attempting to explain.

The dB Nav_Buttons_XP.mdb opens to Client_Info form. On the lower right are a picture object and a command button. They look the same; the picture is on the left of the two.

The code for the command button is behind the OnClick event. The OnDblClick calls the OnClick. The problem here is that no matter what I do, a 'double click' opens Client Info Form 2 then 3.

The other frustration comes from the picture object in the opening form. If you cut the data from the Phone Number required field and click the picture button, it lets you go to the next form (this is different behavior than in my program but the problem is the same). Try to go on to the 3rd form. An error message is issued. Paste the Phone Number back in. Try the picture button again. Try the picture button. The error is displayed. This cycle repeats.

Using the command button the form behaves, as it should with regards to required fields.

If you are getting the same kind of response, then I know that my O/S and Access are OK. If not then great sadness falls over southeast Kansas!

And of course, if you know how I can solve either problem then I take advantage of your help!

[I canot tell if my attachment took! If not then I'll try again.]
 
I found this in the forum FAQ:

"The administrator may allow you to use the attachment feature of this forum, which gives you the ability to attach files of certain types to your posts. This could be an image, a text document, a zip file etc. There will be a limit to the file size of any attachments you make, as the forums should not be used as an extension of your hard disk!"

So I may not be allowed to add the attachment. As for file size, it is 238kb.

I get no conformation or denial when I perform the upload.
 
Zip File Too Large

I cut the mdb back as far as I could. Zipped, it is 230KB. File upload limitation is 100 kb.

Anyone wanting to look at this please respond here or in a private message.

I continue to find that labels and graphics, although having the OnClick and OnDblClick, do NOT have the capability of a command button.

Guess that's all to that!
 
Command Navigation Buttons: Stop Extra Clicks

Well, I am back to command buttons again. Neither graphics nor labels could solve the problem. I thought offsetting the buttons for adjoining forms would work and it does in my development resolution 1024x786.

Unfortunately, my client uses a laptop at a higher resolution and the buttons overlap there. She excitedly told me she could triple-click to the 3rd form ahead. Yuck!

I have attempted to trap the double-click by calling the single click event but this is not successful. I am also sure that Navigation buttons have been successfully created.

Any thoughts will be greatly appreciated!
 

Users who are viewing this thread

Back
Top Bottom