![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I'm new to this, any help gratly appreciated: When I add a new record in a form, is there a way to have one of the fields "inherit" the value of the previous record? thanks in advance, Lasse Farner |
#2
| |||
| |||
|
|
Yep. Read about Send Keys in the help files. I use the following to automatically enter a Set number in the Set field when that field gets the focus (Event property - Got Focus), which is picked up from the same field in the previous record. The same set number will be entered in the Set field until the user manually overtypes the value. Then the next new record will use the new value until such time that it is manually changed again. Option Compare Database Option Explicit '------------------------------------------------------------ ' SendKeysSetNumber ' '------------------------------------------------------------ Function SendKeysSetNumber() On Error GoTo SendKeysSetNumber_Err SendKeys "^(')", False SendKeysSetNumber_Exit: Exit Function SendKeysSetNumber_Err: MsgBox Error$ Resume SendKeysSetNumber_Exit End Function -- Greg Homyer "Lasse Farner" <retro22x (AT) hotmail (DOT) com> wrote in message news:bgo8r5$bnb$1 (AT) troll (DOT) powertech.no... I'm new to this, any help gratly appreciated: When I add a new record in a form, is there a way to have one of the fields "inherit" the value of the previous record? thanks in advance, Lasse Farner |
![]() |
| Thread Tools | |
| Display Modes | |
| |