PDA

View Full Version : Solved: Code or Control setting?



Aussiebear
04-06-2006, 02:58 AM
I have a form which requires me to complete 7 fields. Of the seven fields two ( Date and Dispatch Number) may remain the same data input for up to 50 records at a time. Is it code that I require or a control setting that will allow me to reuse the last entered data in the new form?

The objective here is to gain a time effeciency when entering approximately 3000 records to a home designed database. I would like to enter data, click new record and have the ability to simply tab over consistant data such as Date and Dispatch number until the need to alter one or either.

If it is simply a control setting, then you can whip me with a feather until my nose bleeds...

GaryB
04-06-2006, 03:19 PM
Hi,

What I have been doing in a smilar situation is have record selectors set to yes and then copy and paste the information from one record to a new record. This assuming that each record has an index or individual number. So far it has worked great for us.

Gary

XLGibbs
04-06-2006, 04:51 PM
There are also ways, although a bit more set up involved, to create a combo box with the existing record(column) as the row source which would allow you to either select or type with autocomplete entries that have been previously used.

Having small control tables set up within a relational database can also simplify matters, particularly if there are small lists of regular used data that can be linked on various primary keys.

Aussiebear
04-07-2006, 02:44 AM
In some of the accounting packages, like Quickbooks, offer the ability to retain the last used date so i know its not impossible. Anyway I shall wait here in hope for you guys to spread the good oil.....

geekgirlau
04-09-2006, 06:35 PM
The keyboard shortcut [Ctrl-Apostrophe]will copy the value of that field from the previous record. Maybe you can have some code in the On Lost Focus event for the control that sets it to the previous value if the current value is Null (i.e. the user has tabbed past the field).

Aussiebear
04-10-2006, 03:06 AM
Okay, I've found a way around it be redesigning the form so that the first five cells reflect the data of the record and I've only got to enter two fields. Sorry to have put you all in a tiz on this. I should have given it more thought before posting. Anyway my heartfelt thanks to GaryB, XlGibbs and Geekgirlau who contributed.

Righto... who borrowed the "Solved" stamp and didn't put it back???

geekgirlau
04-11-2006, 06:32 PM
It's not working at the moment, but I've changed it for you.

wasim_sono
04-11-2006, 11:10 PM
Hi all

If u simply write a code like this then u may solve the problem.

Private Sub date_BeforeUpdate(Cancel As Integer)
Me.date.DefaultValue = """" & (Me.date.Value) & """"
End Sub

Regards.

Wasim
:thumb

Aussiebear
04-12-2006, 03:38 AM
Thanks Wasim, but I'm finding Geek's advice to be particularly useful at the moment. At work they are going " How'd you do that so quickly".... and I lied " Cos I'm good". Helps to have a shortcut in your back pocket doesn't it?

geekgirlau
04-12-2006, 05:43 PM
Now if you could just get them to bow or throw money as you walk past ... :devil: