In my database i have many fields where i need the user to be able to copy the text to clipboard to cut down on human error... Literally there is probably 50-60 of these fields. Currently i have them setup like this on the double click event..
If IsNull(Me.Shipper_Full_Address) = True Then
Exit Sub
Else
Me.Shipper_Full_Address.SetFocus
Me.Shipper_Full_Address.SelStart = 0
Me.Shipper_Full_Address.SelLength = Len(Me.Shipper_Full_Address)
RunCommand acCmdCopy
End If
I know that there is a better way to do this... I had thought maybe create a module with the code & pass the field name the user clicks on to the module?? Any ideas or thoughts on how to do this? Right now i have 50-60 of the above code when i think i could have just one.. thanks..
If IsNull(Me.Shipper_Full_Address) = True Then
Exit Sub
Else
Me.Shipper_Full_Address.SetFocus
Me.Shipper_Full_Address.SelStart = 0
Me.Shipper_Full_Address.SelLength = Len(Me.Shipper_Full_Address)
RunCommand acCmdCopy
End If
I know that there is a better way to do this... I had thought maybe create a module with the code & pass the field name the user clicks on to the module?? Any ideas or thoughts on how to do this? Right now i have 50-60 of the above code when i think i could have just one.. thanks..