col_jack_oneal
asked on
next record
how can i make a newrecord appear when i hit enter
i am using a data control to access an MS access database.
Cheers guys
i am using a data control to access an MS access database.
Cheers guys
ASKER
no doesnt work, mlmcc
It may have to be
If (KeyAscii = 13) then
rs.NextRecord
end if
Obviously th e rs. NextRecord needs to be changed to your datacontrol and the next record method
mlmcc
If (KeyAscii = 13) then
rs.NextRecord
end if
Obviously th e rs. NextRecord needs to be changed to your datacontrol and the next record method
mlmcc
Should be able to do something in KeyPress event like
If (KeyAscii = 13) then
ReplaceWithDataControlName .Addnew
ReplaceWithDataControlName .Movelast
end if
If (KeyAscii = 13) then
ReplaceWithDataControlName
ReplaceWithDataControlName
end if
ASKER
method or data member not found, highlights .addnew
Sorry,
use the following in KeyPress
If (KeyAscii = 13) then
ReplaceWithDataControlName .RecordSet .Addnew
'this creates a new record and moves the focus to that record. No need for the Movelast.
end if
use the following in KeyPress
If (KeyAscii = 13) then
ReplaceWithDataControlName
'this creates a new record and moves the focus to that record. No need for the Movelast.
end if
col_jack_oneal,
How exactly did you bind the data to the control?
Please maintain your open questions
https://www.experts-exchange.com/questions/20723290/early-log-off.html
https://www.experts-exchange.com/questions/20557338/Maxtor-Hard-Drives-Slaving-Problem.html
Leon
How exactly did you bind the data to the control?
Please maintain your open questions
https://www.experts-exchange.com/questions/20723290/early-log-off.html
https://www.experts-exchange.com/questions/20557338/Maxtor-Hard-Drives-Slaving-Problem.html
Leon
ASKER
diarmaid, it works in a command button but not on key press, i put it in the form keypress should it be somewhere else
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Something like
If (KeyAscii = vbCr) then
rs.NextRecord
end if
mlmcc