G
Guest
Thanks for replying. More details:
The data entry form has 5 text boxes that fill 5 fields in my Transactions
table
Ref - Numeric
Date - Short Date
Supplier - Text
Project - Text
Value - numeric
I have set each of the text boxes in my form frmAutoTransactionEntry to the
following default values:
Ref - 99
Date - =date()
Supplier - TEST
Project - AA0000 (which is a test project)
Value - 0
There is a button which closes the form (and which normally would post the
record to the table)This is the only code on the form:
Private Sub CloseButton_Click()
On Error GoTo Err_Command_Click
Me.Refresh
If Me.Dirty Then
Me.Dirty = False
End If
DoCmd.Close acForm, "frmAutoTransactionEntry"
Exit_Command_Click:
Exit Sub
Err_Command_Click:
msgbox Err.Description
Resume Exit_Command_Click
End Sub
When the form opens the text boxes are populated with the default values,
but unless I amend the details in one of the text boxes the record is not
posted to the table. I suspect I need to force a change event to happen but I
don't know how. I put the me.refresh in to do this but it didn't work.
The data entry form has 5 text boxes that fill 5 fields in my Transactions
table
Ref - Numeric
Date - Short Date
Supplier - Text
Project - Text
Value - numeric
I have set each of the text boxes in my form frmAutoTransactionEntry to the
following default values:
Ref - 99
Date - =date()
Supplier - TEST
Project - AA0000 (which is a test project)
Value - 0
There is a button which closes the form (and which normally would post the
record to the table)This is the only code on the form:
Private Sub CloseButton_Click()
On Error GoTo Err_Command_Click
Me.Refresh
If Me.Dirty Then
Me.Dirty = False
End If
DoCmd.Close acForm, "frmAutoTransactionEntry"
Exit_Command_Click:
Exit Sub
Err_Command_Click:
msgbox Err.Description
Resume Exit_Command_Click
End Sub
When the form opens the text boxes are populated with the default values,
but unless I amend the details in one of the text boxes the record is not
posted to the table. I suspect I need to force a change event to happen but I
don't know how. I put the me.refresh in to do this but it didn't work.