Data on a Form problem - pls help

M

Mike

Hi,

I have a data entry form which is used to enter data,
i.e. recipts on payment sthatwe have recived during the
day or last days. I would like to have a data received or
posted field on my form to keep the first data entered
and stay the same for the next record or records until I
change it but the changed one also stays for next x
records to be added and so on. i posted this question
before and i got a suggestion that keeps the very first
date entered as the default and stays there, provided all
my recipts to be entered having the same date this will
work but once I start entering recipts for a different
data, I again have to change data maually.

Is there any way to accomplished this task?

Thanks in advance for you help.

Regards,

Mike
 
T

TC

Mike, I don't have Access here to check, but from memory, >unbound< fields
are retained (not erased or reset) when each new record is saved. If that is
true, just do this. Say the name of the relevant date field is DateReceived,
and the textbox is txtDateRecived.

- Leave the textbox unbound, that is, do not put anything in its
Controlsource property;
- put this in form_beforeupdate, to manually copy the entered value into the
field:
Me![DateReceived] = me![txtDateRecived]

If unbound fields >are< erased when a new record is saved, forget that I
suggested this!

HTH,
TC
 
M

Malcolm Cook

yes TC, you're right, i guessed their names for Mike'sproject, not knowing
what you named them

but of course they should really be named with prefixes according to some
convention like


Private Sub Form_AfterUpdate()
Me.datPostedOn.DefaultValue = CStr(Me.datPostedOn.Value)
Me.datReceivedOn.DefaultValue = CStr(Me.datReceivedOn.Value)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top