Microsoft
Software
Hardware
Network
Question : Setfocus in a function
I am trying to find a record in a function. I have multiple forms like this so I thought I'd do it in a function. This does not work..
Function findcase(caseid As String)
ActiveForm.accid.SetFocus
DoCmd.FindRecord caseid
ActiveForm.local_case_id.S
etFocus
End Function
I know it works to use forms![formname]![accid].s
etfocus but how do I pass it?
I tried to add a second parameter but it kept asking for an =.
This should be easy - why am I so frustrated?
Answer : Setfocus in a function
try
Function findcase(caseid As String, sForm as string, sControl as string)
Forms(sForm)(sControl).Set
Focus
DoCmd.FindRecord caseid
End Function
to use
call findcase("1234","NameOfFor
m","NameOf
Control")
Random Solutions
disassociate a Label from a Text box
I am unable to open word or excell folders in microsoft office professional 2007. There appears to be a problem with the encryption. I will attache a couple of examples.
Excel chart with two Y - axis (vertical)
Server rebooting with Error code Error code 000000d1, parameter1 00000004, parameter2 d0000009, parameter3 00000000, parameter4 f737bb85.
How to copy field data to anotehr field
macro to insert headers
how can i in Java language update a VFP table dbf
Icons on desktop don't completely refresh
SSIS dataflow task could not be created
Response.Redirect in silverlight