create your table. pick a field to store the caption.
create a button. for below I called it command2
under properties for that button clear the ‘picture’ field.
create some code, under ‘on click’ for that button add the following.
below prompts for string when they ‘click’ on the button
Private Sub Command2_Click()
Dim temp
temp = InputBox(“Give me a title”) ‘ prompt for a string
Command2.Caption = temp ‘ update the caption for this button
Me.Field2 = temp ‘ field defined to your table
RunCommand acCmdSaveRecord ‘ save the record
Me.Refresh ;refresh the screen
End Sub
under form property add some vba to ‘on current’
below updates the ‘button’ as they scroll through the records
btw: I do not have field2 defined to the form but it is in the table this form is referencing
Private Sub Form_Current()
Dim temp
If IsNull(Me.Field2) Then ‘ if new record or field2 is null then prompt
temp = InputBox(“Give me a title”) ‘ ok, give me title for this button
Command2.Caption = temp ‘ update the caption for this button
Me.Field2 = temp ‘ update field2
RunCommand acCmdSaveRecord ‘ save the record
Else
Command2.Caption = Me.Field2 ‘ ok, already have data, display it. no prompt
End If
Discuss This Question: 2  Replies