Keypad for multiple forms (1 Viewer)

PietKruger

Registered User.
Local time
Today, 23:59
Joined
Apr 11, 2008
Messages
13
Hi,

I have a form called bookings with a few text boxes. My database will be operated with a touch screen. as soon as the user click on one of the textboxes the frmkeypad opens. I struggle with the following code:

I need the Value of txtnumber on the frmkeypad to be stored in the field of the textbox on the bookings form that was clicked. The frmkeypad will also be used for entering data into other forms in the database.

Any sugestions? Please help

Piet
 

Attachments

  • db1.zip
    25.1 KB · Views: 164

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 21:59
Joined
Jul 9, 2003
Messages
14,646
Approach you could use:

multiple forms
You could create a version of the form for every control that needs to call it. (Not recommended but it will work)

openargs (with one form only)
Your form "frmkeypad" needs to know which control it was called from, you could do this by passing the name of the control through the openargs paramitter, then in the form "frmkeypad" use the name of the control passed to direct the inputted text back to the correct control. (again will work but still is difficult if you use the control with more than one form)

openargs (handles multiple forms)
Same as above, but pass the form name as well as the control name, (again this will work, but I feel it is still messy)

custom properties
When passing the form name and the control name, this is possible through the openargs, but is quite complicated and I would recommend that you pass the values into custom properties, avoid using openargs if you need to handle more than one parameter. (you can use openargs with more than one parameter but I personally don't like it)

custom class
There is another method which utilizes a custom class, you can download a working database with it in from here: however this one is set up to operate a calendar form, which actually you may find useful for your project instead of the date picker.
 
Last edited:

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 21:59
Joined
Jul 9, 2003
Messages
14,646
I have used a custom class to get the form to open from any of the required text boxes. It can also be opened from a command button, all you have to do is to name the command button in a similar way to the text box you wish the answer to go into. For example if the command button was named thus:

btnDOB

then you would name the text box where you wanted the result to go to thus:

txtDOB

There is more information about it here:
 
Last edited:

PietKruger

Registered User.
Local time
Today, 23:59
Joined
Apr 11, 2008
Messages
13
I've downloaded your database and "played" with it. I imported your Module into my database and tried to modify your code to work for my database. I just got a lot of errors. I am so frustrated with myself. I feel so stupid. I've read the help file and it confuses me more. i quess to many new things at once.

Would you mind having a look at my database?
 

Attachments

  • db1.zip
    86.2 KB · Views: 152

Users who are viewing this thread

Top Bottom