Forum Home
Press F1
 
Thread ID: 53910 2005-01-31 00:28:00 MS Access Help RoffeNZ (7053) Press F1
Post ID Timestamp Content User
319574 2005-01-31 00:28:00 I have built a database in which I want to be able to; enter free text into a text box on a form but also have the option, if necessary, to enter pre-prepared text into the text box by pressing a button. Hopefully somebody out there can help :dogeye: RoffeNZ (7053)
319575 2005-01-31 01:11:00 Create a button and use the OnClick option in Form design.
Create an Event Procedure along the lines of:

Private Sub PrintButton00_Click()
On Error GoTo Err_PrintButton00_Click
'where PrintButton00 is the name of the button'

textfield = "Welcome to the PleasureDome"
'where textfield is the name of the text box and "Welcome to the PleasureDome" is the text to be inserted'
'place the text within quotation marks'

Exit_PrintButton00_Click:
Exit Sub

Err_PrintButton00_Click:
MsgBox Err.Description
Resume Exit_PrintButton00_Click

End Sub



Quote For The Week
Even if you're on the right track, you'll get run over if you just sit there
- Will Rogers
merlin (256)
1