Need to Recreate or Code equivelant to CRTL + '

D

desireemm

hello I have been battling this issue for a while now and I need some help
please. From the information I have gather all says that the ADP does not
support the short cut key CTRL +' and I need that feature because the users
like it allot, it saves them allot of time on data entry. So I need to create
a macro or something that will do the same thing. Its like a Ditto key, so I
create an AutoKey Macro that will do the same thing as the CTRL +', anyone
know how I can do that?? or the DLast Function, here is what I found so far
but unsure what to do.
the 10248 is an ID but that can change as the user is entering data, so do I
have to give it a specific ID? Or couldnt I just put the [Parent ID] in there
instead?? Not sure what to do





Dim LTotal As Currency

LTotal = DLast("UnitPrice", "Order Details", "OrderID = 10248")
 
A

Arvin Meyer [MVP]

Use the name "AutoKeys" as the macro name. Make sure that the macro names
column is turned on, so you can have more than 1, and give your macro a
name, using a caret for Ctrl, say:

^A

Then Macro Action column, put RunCode, and fill in the argument, something
like:

DLast("UnitPrice", "Order Details","OrderID = " & InputBox("Enter a
number"))
 
D

desireemm

what if its a subform (Tanf_tbl subform)

ok so would it look like this
LTotal = DLast("Earned hours", "Contact Date", "SCAIRCaseWorker", "Catagory
for hours", "Services Covered", "State Catagory", "State Services Covered",
"Purpose of Contact"=& Forms!TanfParticipants_frm!Parent ID)

is that ok?? and where in the form properties do I put that in the Onclick
are or OnKeyPress??

Arvin Meyer said:
Use the name "AutoKeys" as the macro name. Make sure that the macro names
column is turned on, so you can have more than 1, and give your macro a
name, using a caret for Ctrl, say:

^A

Then Macro Action column, put RunCode, and fill in the argument, something
like:

DLast("UnitPrice", "Order Details","OrderID = " & InputBox("Enter a
number"))
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


desireemm said:
hello I have been battling this issue for a while now and I need some help
please. From the information I have gather all says that the ADP does not
support the short cut key CTRL +' and I need that feature because the
users
like it allot, it saves them allot of time on data entry. So I need to
create
a macro or something that will do the same thing. Its like a Ditto key, so
I
create an AutoKey Macro that will do the same thing as the CTRL +', anyone
know how I can do that?? or the DLast Function, here is what I found so
far
but unsure what to do.
the 10248 is an ID but that can change as the user is entering data, so do
I
have to give it a specific ID? Or couldnt I just put the [Parent ID] in
there
instead?? Not sure what to do





Dim LTotal As Currency

LTotal = DLast("UnitPrice", "Order Details", "OrderID = 10248")
 
A

Arvin Meyer [MVP]

In order to fill a textbox, you would not use AutoKeys. Instead write some
VBA code to return a value like:

Public Function FillValue() As Variant
FillValue = DLast("UnitPrice", "Order Details","OrderID = " &
InputBox("Enter a number"))
Screen.PreviousControl = FillValue
End Function


Save it in a standard module with a name like basUtilities, then call it
from a Command Button Click event on the subform:

=FillValue()

Now click in the textbox you want to fill, then click the button.

I have no idea what you are trying to do with your code, but I can tell you
that it's not anything that would work. Now if you are trying to fill a
record. The code above won't work either. What you need to do is to explain
what you are trying to accomplish.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


desireemm said:
what if its a subform (Tanf_tbl subform)

ok so would it look like this
LTotal = DLast("Earned hours", "Contact Date", "SCAIRCaseWorker",
"Catagory
for hours", "Services Covered", "State Catagory", "State Services
Covered",
"Purpose of Contact"=& Forms!TanfParticipants_frm!Parent ID)

is that ok?? and where in the form properties do I put that in the Onclick
are or OnKeyPress??

Arvin Meyer said:
Use the name "AutoKeys" as the macro name. Make sure that the macro names
column is turned on, so you can have more than 1, and give your macro a
name, using a caret for Ctrl, say:

^A

Then Macro Action column, put RunCode, and fill in the argument,
something
like:

DLast("UnitPrice", "Order Details","OrderID = " & InputBox("Enter a
number"))
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


desireemm said:
hello I have been battling this issue for a while now and I need some
help
please. From the information I have gather all says that the ADP does
not
support the short cut key CTRL +' and I need that feature because the
users
like it allot, it saves them allot of time on data entry. So I need to
create
a macro or something that will do the same thing. Its like a Ditto key,
so
I
create an AutoKey Macro that will do the same thing as the CTRL +',
anyone
know how I can do that?? or the DLast Function, here is what I found so
far
but unsure what to do.
the 10248 is an ID but that can change as the user is entering data, so
do
I
have to give it a specific ID? Or couldnt I just put the [Parent ID] in
there
instead?? Not sure what to do





Dim LTotal As Currency

LTotal = DLast("UnitPrice", "Order Details", "OrderID = 10248")
 
D

desireemm

trying to give the users the ability to Insert the data from the same field
in the previous record without having to retype in the same information over
and over again from one record to another. Trying to make Data entry faster

Arvin Meyer said:
In order to fill a textbox, you would not use AutoKeys. Instead write some
VBA code to return a value like:

Public Function FillValue() As Variant
FillValue = DLast("UnitPrice", "Order Details","OrderID = " &
InputBox("Enter a number"))
Screen.PreviousControl = FillValue
End Function


Save it in a standard module with a name like basUtilities, then call it
from a Command Button Click event on the subform:

=FillValue()

Now click in the textbox you want to fill, then click the button.

I have no idea what you are trying to do with your code, but I can tell you
that it's not anything that would work. Now if you are trying to fill a
record. The code above won't work either. What you need to do is to explain
what you are trying to accomplish.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


desireemm said:
what if its a subform (Tanf_tbl subform)

ok so would it look like this
LTotal = DLast("Earned hours", "Contact Date", "SCAIRCaseWorker",
"Catagory
for hours", "Services Covered", "State Catagory", "State Services
Covered",
"Purpose of Contact"=& Forms!TanfParticipants_frm!Parent ID)

is that ok?? and where in the form properties do I put that in the Onclick
are or OnKeyPress??

Arvin Meyer said:
Use the name "AutoKeys" as the macro name. Make sure that the macro names
column is turned on, so you can have more than 1, and give your macro a
name, using a caret for Ctrl, say:

^A

Then Macro Action column, put RunCode, and fill in the argument,
something
like:

DLast("UnitPrice", "Order Details","OrderID = " & InputBox("Enter a
number"))
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


hello I have been battling this issue for a while now and I need some
help
please. From the information I have gather all says that the ADP does
not
support the short cut key CTRL +' and I need that feature because the
users
like it allot, it saves them allot of time on data entry. So I need to
create
a macro or something that will do the same thing. Its like a Ditto key,
so
I
create an AutoKey Macro that will do the same thing as the CTRL +',
anyone
know how I can do that?? or the DLast Function, here is what I found so
far
but unsure what to do.
the 10248 is an ID but that can change as the user is entering data, so
do
I
have to give it a specific ID? Or couldnt I just put the [Parent ID] in
there
instead?? Not sure what to do





Dim LTotal As Currency

LTotal = DLast("UnitPrice", "Order Details", "OrderID = 10248")
 
J

John W. Vinson

trying to give the users the ability to Insert the data from the same field
in the previous record without having to retype in the same information over
and over again from one record to another. Trying to make Data entry faster

One thing you can do is use each such control's AfterUpdate event to set that
control's DefaultValue property:

Private Sub controlname_AfterUpdate()
Me.controlname.DefaultValue = """" & Me.controlname & """"
End Sub

This will make the control "sticky" - it will remember whatever was last
entered.

Can be a bit dangerous, like any default, because you can't be sure it will
get changed when needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top