repost - Can I post a record Automatically? Help!
- From: Heather <Heather@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 5 Apr 2006 07:50:03 -0700
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.
"Douglas J Steele" wrote:
Afraid you'll need to give more details than that!
What does the data in a transaction look like? Is it possible to simply use
an INSERT INTO SQL statement to provide those values?
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Heather" <Heather@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EB7065AA-C543-415E-BF42-B903462E0002@xxxxxxxxxxxxxxxx
I would like to post a test record each day automatically. The record isto
test whether our overnight copy of the tables is working, the overnightcopy
overwrites the previous days copy and I would like to open the copydatabase
from time to time and check the date of the test transaction.close
I have a Data Entry form and had hoped that a copy of that form, with
default values in each field could be used. I hoped to open the form,
it and have it post the entries to the table. Unfortunately it doesn'tpost
the record unless I amend some of the data in the form.
Help!
.
- Follow-Ups:
- Prev by Date: Re: Dynamically Inserting Pages into Tab Controls
- Next by Date: Re: Saved by the Mouse
- Previous by thread: Re: Update a TextBox based on a CheckBox
- Next by thread: RE: repost - Can I post a record Automatically? Help!
- Index(es):