By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,482 Members | 2,411 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,482 IT Pros & Developers. It's quick & easy.

AutoPopulate Field On new Record

P: 1
I have an Access form. In this form I have a date textbox and I want AfterUpdate on textbox to autopopulate the field of employeesid from the previous record which I manually filled already.
Aug 18 '12 #1
Share this Question
Share on Google+
6 Replies


zmbd
Expert Mod 5K+
P: 5,287
@Master810


Welcome to the bytes forum!

Normally we'd also like to see any code that you may have already attempted; however, please remember to enclose the code within the [code] [/code] code tags.

This is a tricky bit of magic and not as straight forward as one would think: http://support.microsoft.com/kb/210236

I've use a version of this on several forms.

Before you post more questions please take the time to read the following: Posting Guidelines
How to ask good questions
FAQ

Here are few links that will answer a good number of questions and other issues:
A Tutorial for Access
Database Normalization and Table Structures.
access insights
Especially 161.Example Filtering on a Form.

-z
Aug 18 '12 #2

TheSmileyCoder
Expert Mod 100+
P: 2,321
I think the easiest approach would be to use the AfterUpdate Event of the EmployeeID control, to store the last entered EmployeeID as the default value for that control.

This does not exactly meet your requirements of doing it after the update of the Date field, but I think it will fullfill your needs fine, and with alot less effort.
Aug 20 '12 #3

zmbd
Expert Mod 5K+
P: 5,287
I think the easiest approach would be to use the AfterUpdate Event of the EmployeeID control, to store the last entered EmployeeID as the default value for that control.
Perhaps I read the OP incorrectly; however, from both the OP and NeoPa's rewrite, I am still under the impression that the desire was to carry the value from prior record to the new record.
Perhaps Master810 can clarify the desired actions?
-z
Aug 21 '12 #4

NeoPa
Expert Mod 15k+
P: 31,186
No matter how many ways you read it Z, the question makes no actual sense.

My best guess is that the OP wants any new records to be populated with the same value as the record entered just prior to the new record. In that sense, I suspect that Smiley's suggestion is a (possibly the only) viable approach to follow.
Aug 22 '12 #5

zmbd
Expert Mod 5K+
P: 5,287
ms site in #2 will do this.
I'm starting to wonder if OP, DB is normalized.
-z
Aug 22 '12 #6

NeoPa
Expert Mod 15k+
P: 31,186
Although that goes into much more detail, and even provides some code as an example of how to use it, it's fundamentally the same concept. Sure it should work, but it's not a different approach.

Except for the Ctrl-Apostrophe (^') that is. That doesn't quite answer the question as I see it (and like everyone-else I'm using intelligent guesswork on that front), but is certainly an interesting concept. One of which I was previously unaware to boot (and I love learning new approaches).

Good work anyway - to both of you :-)
Aug 22 '12 #7

Post your reply

Sign in to post your reply or Sign up for a free account.