A client wants a press of the Enter key in a field on a continuous form to
grab the value of that field from the previous record.
But if they have typed a value and then hit Enter it shouldn't.
I have tried a few ways but the main problem is that after typing a value
and hitting Enter it still grabs the value from the previous record,
trashing the value they just typed.
Any ideas from you lateral thinkers.
Jeff Pritchard
________________
Asken Research Pty. Ltd.
Access Database Developers http://www.asken.com.au 8 3130
On Mar 21, 10:20 pm, "Jeff" <jeff.pritch...@asken.com.auwrote:
A client wants a press of the Enter key in a field on a continuous form to
grab the value of that field from the previous record.
But if they have typed a value and then hit Enter it shouldn't.
I have tried a few ways but the main problem is that after typing a value
and hitting Enter it still grabs the value from the previous record,
trashing the value they just typed.
Any ideas from you lateral thinkers.
Jeff Pritchard
________________
Asken Research Pty. Ltd.
Access Database Developershttp://www.asken.com.au
Why don't you try it the other way around? Fill the field when it
gets focus (or maybe enter event) and then when they type, the
previous value will be overwritten. I have not tried that exactly,
but should be doable.
Couple of reasons.
This is to mimic the behaviour of another older system that they use - I kid
you not. Reluctant to change.
Also, if everything is filled in they will have to clear fields that they
don't want to enter, instead of just tabbing through. That's the other bit.
If they don't want to copy the previous value nor enter anything they must
be able to simply tab through.
Is this a worthwhile exercise? Not in my opinion, and I have expressed that.
But the client is trying to get staff to accept the software and thus is
prepared to go to some lengths to do so. Not my preferred approach but not
my call.
<en****@ridesoft.comwrote in message
news:11*********************@n76g2000hsh.googlegro ups.com...
On Mar 21, 10:20 pm, "Jeff" <jeff.pritch...@asken.com.auwrote:
>A client wants a press of the Enter key in a field on a continuous form to grab the value of that field from the previous record.
But if they have typed a value and then hit Enter it shouldn't.
I have tried a few ways but the main problem is that after typing a value and hitting Enter it still grabs the value from the previous record, trashing the value they just typed.
Any ideas from you lateral thinkers.
Jeff Pritchard ________________ Asken Research Pty. Ltd. Access Database Developershttp://www.asken.com.au
Why don't you try it the other way around? Fill the field when it
gets focus (or maybe enter event) and then when they type, the
previous value will be overwritten. I have not tried that exactly,
but should be doable.
Jeff, what would they expect if they backspaced the value out, and then
pressed Enter?
If that process should also assign the value from the other record, you
might use the KeyDown event to test if the Text of the control is a
zero-length-string, and if so, assign the value.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Jeff" <je************@asken.com.auwrote in message
news:46***********************@per-qv1-newsreader-01.iinet.net.au...
Couple of reasons.
This is to mimic the behaviour of another older system that they use - I
kid you not. Reluctant to change.
Also, if everything is filled in they will have to clear fields that they
don't want to enter, instead of just tabbing through. That's the other
bit. If they don't want to copy the previous value nor enter anything they
must be able to simply tab through.
Is this a worthwhile exercise? Not in my opinion, and I have expressed
that. But the client is trying to get staff to accept the software and
thus is prepared to go to some lengths to do so. Not my preferred approach
but not my call.
<en****@ridesoft.comwrote in message
news:11*********************@n76g2000hsh.googlegro ups.com...
>On Mar 21, 10:20 pm, "Jeff" <jeff.pritch...@asken.com.auwrote:
>>A client wants a press of the Enter key in a field on a continuous form to grab the value of that field from the previous record.
But if they have typed a value and then hit Enter it shouldn't.
I have tried a few ways but the main problem is that after typing a value and hitting Enter it still grabs the value from the previous record, trashing the value they just typed.
Any ideas from you lateral thinkers.
Jeff Pritchard ________________ Asken Research Pty. Ltd. Access Database Developershttp://www.asken.com.au
Why don't you try it the other way around? Fill the field when it gets focus (or maybe enter event) and then when they type, the previous value will be overwritten. I have not tried that exactly, but should be doable.
Jeff wrote:
Couple of reasons.
This is to mimic the behaviour of another older system that they use - I kid
you not. Reluctant to change.
They really can't adapt to the already available ctrl+' ?
That doesn't work on a continuous form used in a subform. At least not for
me.
Even if it did, I doubt that that would be good enough.
A couple of staff have trouble adapting to a database generally. Their
previous system was basically paper based. One guy actually resigned because
he didn't want to deal with it. Mind you, he was getting ready to retire and
I think this just made his mind up.
"rkc" <rk*@rkcny.yabba.dabba.do.comwrote in message
news:46**********************@roadrunner.com...
Jeff wrote:
>Couple of reasons.
This is to mimic the behaviour of another older system that they use - I kid you not. Reluctant to change.
They really can't adapt to the already available ctrl+' ?
Good question. I expect that they would want it to copy the previous value.
I will ask and check what happens in the other software.
At the moment I am using the KeyDown event to handle things but have a
little problem when you enter a value but still hit Enter. It still copies
the value trashing the one entered. I have to stop copying if something is
entered, but any test for something entered, such as a test for not null,
fails as the record has not been saved, I think.
If (KeyCode = vbKeyReturn) And (Nz([txtPartWidth], 0) = 0) And
(mlngLastWidth <0) Then
[txtPartWidth] = mlngLastWidth
End If
txtPartWidth adopts the default value and there doesn't seem to be any way
to determine what has been typed in.
Am I missing something obvious here?
"Allen Browne" <Al*********@SeeSig.Invalidwrote in message
news:46***********************@per-qv1-newsreader-01.iinet.net.au...
Jeff, what would they expect if they backspaced the value out, and then
pressed Enter?
If that process should also assign the value from the other record, you
might use the KeyDown event to test if the Text of the control is a
zero-length-string, and if so, assign the value.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Jeff" <je************@asken.com.auwrote in message
news:46***********************@per-qv1-newsreader-01.iinet.net.au...
>Couple of reasons.
This is to mimic the behaviour of another older system that they use - I kid you not. Reluctant to change.
Also, if everything is filled in they will have to clear fields that they don't want to enter, instead of just tabbing through. That's the other bit. If they don't want to copy the previous value nor enter anything they must be able to simply tab through.
Is this a worthwhile exercise? Not in my opinion, and I have expressed that. But the client is trying to get staff to accept the software and thus is prepared to go to some lengths to do so. Not my preferred approach but not my call.
<en****@ridesoft.comwrote in message news:11*********************@n76g2000hsh.googlegr oups.com...
>>On Mar 21, 10:20 pm, "Jeff" <jeff.pritch...@asken.com.auwrote: A client wants a press of the Enter key in a field on a continuous form to grab the value of that field from the previous record.
But if they have typed a value and then hit Enter it shouldn't.
I have tried a few ways but the main problem is that after typing a value and hitting Enter it still grabs the value from the previous record, trashing the value they just typed.
Any ideas from you lateral thinkers.
Jeff Pritchard ________________ Asken Research Pty. Ltd. Access Database Developershttp://www.asken.com.au
Why don't you try it the other way around? Fill the field when it gets focus (or maybe enter event) and then when they type, the previous value will be overwritten. I have not tried that exactly, but should be doable.
Test the Text property of the control, e.g.:
If Me.txtPartWidth.Text <vbNullString Then
Its Value has not been updated at the time the Change or Keyxxx events fire.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Jeff" <je************@asken.com.auwrote in message
news:46**********************@per-qv1-newsreader-01.iinet.net.au...
Good question. I expect that they would want it to copy the previous
value. I will ask and check what happens in the other software.
At the moment I am using the KeyDown event to handle things but have a
little problem when you enter a value but still hit Enter. It still copies
the value trashing the one entered. I have to stop copying if something is
entered, but any test for something entered, such as a test for not null,
fails as the record has not been saved, I think.
If (KeyCode = vbKeyReturn) And (Nz([txtPartWidth], 0) = 0) And
(mlngLastWidth <0) Then
[txtPartWidth] = mlngLastWidth
End If
txtPartWidth adopts the default value and there doesn't seem to be any way
to determine what has been typed in.
Am I missing something obvious here?
"Allen Browne" <Al*********@SeeSig.Invalidwrote in message
news:46***********************@per-qv1-newsreader-01.iinet.net.au...
>Jeff, what would they expect if they backspaced the value out, and then pressed Enter?
If that process should also assign the value from the other record, you might use the KeyDown event to test if the Text of the control is a zero-length-string, and if so, assign the value.
"Jeff" <je************@asken.com.auwrote in message news:46***********************@per-qv1-newsreader-01.iinet.net.au...
>>Couple of reasons.
This is to mimic the behaviour of another older system that they use - I kid you not. Reluctant to change.
Also, if everything is filled in they will have to clear fields that they don't want to enter, instead of just tabbing through. That's the other bit. If they don't want to copy the previous value nor enter anything they must be able to simply tab through.
Is this a worthwhile exercise? Not in my opinion, and I have expressed that. But the client is trying to get staff to accept the software and thus is prepared to go to some lengths to do so. Not my preferred approach but not my call.
<en****@ridesoft.comwrote in message news:11*********************@n76g2000hsh.googleg roups.com... On Mar 21, 10:20 pm, "Jeff" <jeff.pritch...@asken.com.auwrote: A client wants a press of the Enter key in a field on a continuous form to grab the value of that field from the previous record. > But if they have typed a value and then hit Enter it shouldn't. > I have tried a few ways but the main problem is that after typing a value and hitting Enter it still grabs the value from the previous record, trashing the value they just typed. > Any ideas from you lateral thinkers. > Jeff Pritchard ________________ Asken Research Pty. Ltd. Access Database Developershttp://www.asken.com.au
Why don't you try it the other way around? Fill the field when it gets focus (or maybe enter event) and then when they type, the previous value will be overwritten. I have not tried that exactly, but should be doable
Thanks Allen. That and a couple of tweaks and problem solved.
"Allen Browne" <Al*********@SeeSig.Invalidwrote in message
news:46**********************@per-qv1-newsreader-01.iinet.net.au...
Test the Text property of the control, e.g.:
If Me.txtPartWidth.Text <vbNullString Then
Its Value has not been updated at the time the Change or Keyxxx events
fire.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Jeff" <je************@asken.com.auwrote in message
news:46**********************@per-qv1-newsreader-01.iinet.net.au...
>Good question. I expect that they would want it to copy the previous value. I will ask and check what happens in the other software.
At the moment I am using the KeyDown event to handle things but have a little problem when you enter a value but still hit Enter. It still copies the value trashing the one entered. I have to stop copying if something is entered, but any test for something entered, such as a test for not null, fails as the record has not been saved, I think.
If (KeyCode = vbKeyReturn) And (Nz([txtPartWidth], 0) = 0) And (mlngLastWidth <0) Then [txtPartWidth] = mlngLastWidth End If
txtPartWidth adopts the default value and there doesn't seem to be any way to determine what has been typed in.
Am I missing something obvious here?
"Allen Browne" <Al*********@SeeSig.Invalidwrote in message news:46***********************@per-qv1-newsreader-01.iinet.net.au...
>>Jeff, what would they expect if they backspaced the value out, and then pressed Enter?
If that process should also assign the value from the other record, you might use the KeyDown event to test if the Text of the control is a zero-length-string, and if so, assign the value.
"Jeff" <je************@asken.com.auwrote in message news:46***********************@per-qv1-newsreader-01.iinet.net.au... Couple of reasons.
This is to mimic the behaviour of another older system that they use - I kid you not. Reluctant to change.
Also, if everything is filled in they will have to clear fields that they don't want to enter, instead of just tabbing through. That's the other bit. If they don't want to copy the previous value nor enter anything they must be able to simply tab through.
Is this a worthwhile exercise? Not in my opinion, and I have expressed that. But the client is trying to get staff to accept the software and thus is prepared to go to some lengths to do so. Not my preferred approach but not my call.
<en****@ridesoft.comwrote in message news:11*********************@n76g2000hsh.google groups.com... On Mar 21, 10:20 pm, "Jeff" <jeff.pritch...@asken.com.auwrote: >A client wants a press of the Enter key in a field on a continuous >form to >grab the value of that field from the previous record. >> >But if they have typed a value and then hit Enter it shouldn't. >> >I have tried a few ways but the main problem is that after typing a >value >and hitting Enter it still grabs the value from the previous record, >trashing the value they just typed. >> >Any ideas from you lateral thinkers. >> >Jeff Pritchard >________________ >Asken Research Pty. Ltd. >Access Database Developershttp://www.asken.com.au > Why don't you try it the other way around? Fill the field when it gets focus (or maybe enter event) and then when they type, the previous value will be overwritten. I have not tried that exactly, but should be doable
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: qsweetbee |
last post by:
I have a form(fAddUsers) in my database. It is continue form for data
entry. Some fields are required fields. Some are optional fields.
There is 1 particular filed(TokenExpirationDate)on the form...
|
by: Megan |
last post by:
Hi-
I'm creating a database of music bands with their cds and songs.
I'm trying to program an SQL statement so that I can enter a string of
text in a textbox, press the 'Enter' key, and have...
|
by: James Fortune |
last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't
understand why people who know how to write code to completely replace
a front end do not write something that will automate...
|
by: Uninvisible |
last post by:
I have put together a db for a law firm to keep track of counterfeit
activities. There are four parent tables:
tblContact
tblTransaction
tblAction
tblFile
I have created a form,...
|
by: my-wings |
last post by:
I think I've painted myself into a corner, and I'm hoping someone can help
me out.
I have a table of books (tblBooks), which includes a field (strPubName) for
Publisher Name and another field...
|
by: MLH |
last post by:
Fields in MyTable:
PostID
PostDate
RollQtyXfer
RollDenomination
RollCount37
RollCount23
|
by: Alan Mailer |
last post by:
A project I'm working on is going to use VB6 as a front end. The back
end is going to be pre-existing MS Access 2002 database tables which
already have records in them *but do not have any...
|
by: roveagh1 |
last post by:
Hi
I've been using the 2 year old link below to repeat values from previous record field into current corresponding field. It's worked fine for text but the last piece of advice was to use the same...
|
by: 08butoryr |
last post by:
Hey guys I could really use your help with some very basic java programming. I know you programming fundis out there will find this child's play but I'm struggling with it a bit because I'm...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |