View Full Version : Default Record Same As Previous


Scorpion
07-06-2000, 02:46 PM
I need to figure out a code using KeyPress & IsNull. What I want to do is that after I enter the first record in the form, I want to be able to press either "Tab" or "Enter" and skip over fields in the next record. The fields I want to skip over are the fields that will have the identical entry as the previous line. Often when I enter information in my form, the next line has 3-4 fields which are the same as the previous record. I want Access to read the previous record for the same field and enter the same value in the current field if I skip over it without entering information. Therefore I need to use IfNull command somewhere followed by KeyPress (TAB or ENTER) and then the SendKey action, CTRL-Apostrophe(') which is the only way I know of copying the same information for a field from record to record.

Can any help me fiqure out a proper code for this.

[This message has been edited by Scorpion (edited 07-06-2000).]

[This message has been edited by Scorpion (edited 07-06-2000).]

mark_white
07-09-2000, 03:46 AM
In relation to acces aut enterering data try the following and let me know

If IsNull(Me.cmbHeading) = True Then SendKeys "^(')"

this will auto fill in data in a continuous form with the last data entered

let me know

Scorpion
07-10-2000, 06:18 AM
I entered the following in the OnLostFocus action of the field "Date".
If IsNull(Me.Date) = True Then SendKeys "^(')"

Now when I skip over the field "Date" and leave it blank, Access copies the next field "Job #" and not the proper field "Date".

To further inform you, I need to have this action performed for 5 - 6 fields in row.
Any Suggestions.