How to Retrieve record for editing in a blank form

makarije

New member
Local time
Today, 02:23
Joined
Jan 27, 2008
Messages
2
Hi there,

Here is my problem:

I have a form (based on a single table) which opens in a blank format (i.e. does not show records).

I now want to retreive a record by just entering its unique ID ("recordID" which happens to be an autonumber) into an unbound control (called "selecter")on the form ("frmOne"), so that the record's fields can be edited (deleted,added,changed,etc).

How to do this, without using a button ("on click" as if I would do if it was a filter) or combo/list box (which I think would not be feasibel - could not list all autonumbers in the combo-list...)?

So, then, how to retrieve a complete record by typing only its unigue ID (autonumber)?

Many thanks in advance for your time in answering this question
 
So, then, how to retrieve a complete record by typing only its unigue ID (autonumber)?
If you don't want to use a button, you have to use a form event of somekind. Take a look at all the different ones, and read about what they do. Although I must say, your question here is a bit unusual. But, if you must do it, try using some code one of the events.
 
On the unbound text box you open a hidden form when the box gets focus. On the hidden form you put a macro or code on the OnTimer event and run a find record. When the OnTimer even runs to find the record it also closes the hidden form.

Just work out how long you want to sit there before Access rushes off to find the record.:D For me, I would probaby wait 10 minutes and have a smoke and a cup of tea while I contemplated just who belonged to the ID number:D
 
Another way, but not sure it meets your criteria, but no "click" required.

Just put your find record action on LostFocus for the unbound text box and it will go when you hit the enter key.
 
It is Australia Day public holiday, so here is another one:D

First, change your autonumber set up so they kick of at 100,000 plus. Thus you will need 90000 records before Len([YourUnbound]) is exceed 6.

Use the OnTimer event again and have it repeat a save record and the find record runs when your Len([YourUnbound]) = 6: There is an added bouns to this method. If set the OnTime a bit slow then if by mistake you enter 7 numbers it won't run. Part of your OnTimer could include a msg box if Len > 6

You could even use another form and with a slower OnTimer that would bring up the msg box if you have < 6. It could say......whay are you just sitting there, you need to enter two more digits:)
 
many thankk again for your answers, and Mike Happy Australian Day!:)

(I've got found of Australia too - a chap from my native country just won the Grand Slam there! :) )

I will try your suggestions and let you know how it worked.
 

Users who are viewing this thread

Back
Top Bottom