Auto-fill forms in Access 2000

KLund1

Registered User.
Local time
Today, 08:03
Joined
Jul 23, 2018
Messages
12
I just had a fairly complex Access database dropped in my lap to use at work. I know little about Access, but they gave this to me because I know a lot about Excel & Excel macros. The person that wrote the database left the company some time ago.
We use Access 2000. ( ya, I know it is old, but it works, and to company dose not want to upgrade)
The form I need to use looks like it could be auto filled in several places. For example, I have to enter a store number twice. I think the form could auto fill the second field from when the first entry is entered.
Another field usually needs a '2' entered.
How can these be done?
Many thanks for any input, links, or directions
 
The '2' can be supplied by textbox DefaultValue property.

Why would store be input twice? There should be only one control for this input.
 
Thanks for such a quick reply.
I have to enter store number where it was purchased, and where it was repaired. 95% of the time they are the same.
How can I have the repaired str number autofilled when I enter the purchased str number?
Again, thanks
 
June7 appears to be offline. In the after update event of the first control (textbox, combo, etc):

Me.SecondControlName = Me.FirstControlName
 
Thanks for the reply.
I'm not 100% what you mean. I think it is:
right click form, select design view, right click purchase store field, click properties. In new popup box, click event tab, click '...' three dots to the right of 'after update'. Then Expression builder pops up. I click [repair store] from middle column, then =, then click [purchase store], then OK, close and save design view.
I did this. Then opened the form and typed 10 into purchase store, and hit enter. Nothing appears in the repair store field.
Suggestions to 'repair' my unknown error?
 
Can you post EXACTLY what you put in? I am guessing it was [Purchase Store] and NOT the control name.

If you go to the "All" tab for properties you should see the control name at the top. You would use Me.Control name for what you are trying to do.
 
Thanks everyone for all the hand-holding, very much appreciated.

See screenshot of what I did. In expression builder are the 2 fields I'm actually working with.
Like I said above, I did not build this database, and this form is a mess, sorry. I'm going to learn one thing at a time to clean it up. easy of use first with auto fill of some fields.
 

Attachments

  • Access screenshot.jpg
    Access screenshot.jpg
    102 KB · Views: 91
See post 6 for where you should have put the code I posted, modified with your control names.
 
Pbaldy, thanks. Got it to work. Had to find the right event trigger, 'after' works
Thanks everyone!!
 

Users who are viewing this thread

Back
Top Bottom