My Assistant
|
|
Apr 11 2012, 11:04 AM
Post
#1
|
|
|
UtterAccess Guru Posts: 724 From: Arcadia, Florida |
I am putting together a database for use via remote access for my android tablet .... it works fine except the biggest drawback is the keyboard which takes up 1/3 of the screen ..... what I would like is a small numberpad popup that would let the user enter numbers, etc. and have it come up on a double click or ? on the number entry fields .....
thanks ed |
|
|
|
![]() |
Apr 11 2012, 11:07 AM
Post
#2
|
|
|
Access Wiki and Forums Moderator Posts: 48,021 From: SoCal, USA |
Hi Ed,
Take a look at Cybercow's demo in the Code Archive: Keyboard On Screen Just my 2 cents... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
Apr 11 2012, 11:12 AM
Post
#3
|
|
|
UtterAccess Guru Posts: 724 From: Arcadia, Florida |
I did actually see these and they are way way too big for a 10" tablet screen
|
|
|
|
Apr 11 2012, 03:28 PM
Post
#4
|
|
|
UtterAccess Guru Posts: 724 From: Arcadia, Florida |
I put together a small form with text fields for each number 0-9 and have them add to a TOTAL field on the form but what I don't know how to do
is get this back onto the main called form ..... the main form fields I just double click to open the KeyPad Form .... can I pull each number as 'pressed' on the keypad back to the form and or enter the total number put in on the keypad? It would be nice to just have each number when pressed enter into the field on the form thanks ed |
|
|
|
Apr 11 2012, 03:45 PM
Post
#5
|
|
|
Access Wiki and Forums Moderator Posts: 48,021 From: SoCal, USA |
Hi Ed,
It would be nice to just have each number when pressed enter into the field on the form One possible approach is to pass the name of the Control where you want the numbers to appear. That way, your code from the keypad can just use the reference to the control object to pass the numbers entered. However, it might be easier to handle if you could just pass the whole value instead of one number at a time. Just my 2 cents... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
Apr 12 2012, 10:48 AM
Post
#6
|
|
|
UtterAccess Guru Posts: 724 From: Arcadia, Florida |
Easy for you !
OK, the KeyPad has a Field - TOTAL - that holds the entered numbers .... now how do I pass that back to the field on the main form that opened the keypad form? the main form has several fields where I would like this to be usable thanks ed |
|
|
|
Apr 12 2012, 12:33 PM
Post
#7
|
|
|
Access Wiki and Forums Moderator Posts: 48,021 From: SoCal, USA |
Hi Ed,
Couple of ways to pass the value from one form to the other: 1. Pass a reference to the Textbox where you want the value to show up when you open the Keypad. For example: DoCmd.OpenForm "frmKeyPad", , , , , acDialog , "Forms!FormName.ControlName" You can then use that reference to transfer the "Total" back to the calling form. For example: Me.OpenArgs = Me.Total 2. Or, create a Global Variable to store the Form Control Object where you want to pass the value. For example: Public gKeyPad As Textbox Then, in your calling form: Set gKeyPad = Me.ControlName DoCmd.OpenForm "frmKeyPad", , , , , acDialog And to pass the value back: gKeyPad = Me.Total Just my 2 cents... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
Apr 12 2012, 02:47 PM
Post
#8
|
|
|
UtterAccess Guru Posts: 724 From: Arcadia, Florida |
Using the OpenArgs seems to contain the correct values but I get an error that says but stops with
Error 2135 Property is read-only and cannot be set Any ideas? Otherwise I think this will work great ed |
|
|
|
Apr 12 2012, 02:51 PM
Post
#9
|
|
|
Access Wiki and Forums Moderator Posts: 48,021 From: SoCal, USA |
Hi Ed,
I'm sorry, you are correct... That syntax wouldn't work. Try something like: Eval(Me.OpenArgs) = Me.Total Just my 2 cents... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
Apr 12 2012, 03:03 PM
Post
#10
|
|
|
UtterAccess Guru Posts: 724 From: Arcadia, Florida |
Error 424 - Object Required
and eval(me.openargs) now equals the value of me.total and not the calling form |
|
|
|
Apr 12 2012, 03:08 PM
Post
#11
|
|
|
UtterAccess Guru Posts: 724 From: Arcadia, Florida |
when I use me.openargs - me.total and debug and look at each the me.openargs does in fact = forms!mainform!adults and the Me.Total = 12
but I get the error 2135 Now if I change the line and make it the actual forms!MainForm!Adults = "12" it does change the mainform adult field to 12 in this case Don't know if that helps or not ed |
|
|
|
Apr 12 2012, 03:11 PM
Post
#12
|
|
|
Access Wiki and Forums Moderator Posts: 48,021 From: SoCal, USA |
Error 424 - Object Required and eval(me.openargs) now equals the value of me.total and not the calling form Okay, I didn't realize the OpenArgs approach would give us so much trouble. If you still want to use that approach, I would try to modify it a little bit. Otherwise, you might want to give the Global Variable a test drive too. Here's the new approach for the OpenArgs technique: 1. Call the KeyPad form with just the name of the form and the textbox separated by a semicolon. For example: DoCmd.OpenForm "frmKeyPad", , , , , acDialog, "FormName;ControlName" 2. From the KeyPad, you could try something like: Dim strArgs() As String strArgs = Split(Me.OpenArgs, ";") Forms(strArgs(0)).Controls(strArgs(1)) = Me.Total (untested) Just my 2 cents... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
Apr 12 2012, 04:42 PM
Post
#13
|
|
|
UtterAccess Guru Posts: 724 From: Arcadia, Florida |
theDBGuy Magic strikes again --- worked great
thanks |
|
|
|
Apr 12 2012, 04:48 PM
Post
#14
|
|
|
Access Wiki and Forums Moderator Posts: 48,021 From: SoCal, USA |
Hi Ed,
(IMG:style_emoticons/default/yw.gif) Glad to hear you got it to work. Good luck with your project. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 23rd May 2013 - 01:27 AM |