Add/Change or Remove Picture Command buttons

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
How are the "Add/Change" and "Remove" buttons in the "Employees" form in the
Northwind Database (Access 2000 file format) made? These are command buttons
that allow users to add and remove pictures to a form.

Thank you in advance for your help.

Ellen
 
Hi, Ellen.

Both call custom procedures whose code is in the form module. Open the form
in Design View and look at the OnClick event procedures.

Sprinks
 
Thanks, Sprinks. Could you give me more details? I assume I'll start with
"onclick" which I'll find on the properties box of a command button. I've
tried to simply write "getFileName" in the VB code screen, but when I try to
run it, I get an error message.
 
Sure, Ellen.

Click on the ellipsis next to the OnClick property. You should see [Event
Procedure] as the value. getfileName is a procedure defined within the code
module. Do a Find (<Ctrl>-F) on getfileName and you can quickly find it.
Same goes for the hideImageFrame procedure.
 
Hi Sprinks,
I can find the "getFileName" in the existing form, but when I try to make a
new form, it isn't there. I've tried copying all the code from the form that
works into my new form, but I get error messages.

Can you give me any further help?

Ellen


Sprinks said:
Sure, Ellen.

Click on the ellipsis next to the OnClick property. You should see [Event
Procedure] as the value. getfileName is a procedure defined within the code
module. Do a Find (<Ctrl>-F) on getfileName and you can quickly find it.
Same goes for the hideImageFrame procedure.


Ellen said:
Thanks, Sprinks. Could you give me more details? I assume I'll start with
"onclick" which I'll find on the properties box of a command button. I've
tried to simply write "getFileName" in the VB code screen, but when I try to
run it, I get an error message.
 
Hi, Ellen.

Not sure I can help without knowing what the messages are, but I suspect if
you're sure you cut and pasted the code completely, and that the code doesn't
call any OTHER procedures defined in the module (I didn't check for that), it
might be that it calls a library function that you don't currently have
available as defined by your VBA References.

Without carefully studying the code, I tested the buttons in my
implementation; they work correctly with the following references set. You
might want to experiment with turning them on. (Tools, References from the
VBA window).

Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library
Microsoft DAO 3.6 Object Library

Hope that helps.
Sprinks

Ellen said:
Hi Sprinks,
I can find the "getFileName" in the existing form, but when I try to make a
new form, it isn't there. I've tried copying all the code from the form that
works into my new form, but I get error messages.

Can you give me any further help?

Ellen


Sprinks said:
Sure, Ellen.

Click on the ellipsis next to the OnClick property. You should see [Event
Procedure] as the value. getfileName is a procedure defined within the code
module. Do a Find (<Ctrl>-F) on getfileName and you can quickly find it.
Same goes for the hideImageFrame procedure.


Ellen said:
Thanks, Sprinks. Could you give me more details? I assume I'll start with
"onclick" which I'll find on the properties box of a command button. I've
tried to simply write "getFileName" in the VB code screen, but when I try to
run it, I get an error message.

:

Hi, Ellen.

Both call custom procedures whose code is in the form module. Open the form
in Design View and look at the OnClick event procedures.

Sprinks

:

Hello,
How are the "Add/Change" and "Remove" buttons in the "Employees" form in the
Northwind Database (Access 2000 file format) made? These are command buttons
that allow users to add and remove pictures to a form.

Thank you in advance for your help.

Ellen
 
Back
Top