jamaarneen . . .
I'll answer these in order:
jamaarneen said:
[blue]Shift = 0: does that mean that none of Shift/Ctl/Alt are pressed?[/blue]
Yes!
jamaarneen said:
[blue] ... and what will 'Shift' be if one of them ARE pressed?[/blue]
Following is the complete table for the [blue]shift value[/blue] for all 3 keys:
[tt][blue]
Alt Ctrl Shift ShiftValue!
*** **** ***** ***********
No No No 0
No No Yes 1
No Yes No 2
No Yes Yes 3
Yes No No 4
Yes No Yes 5
Yes Yes No 6
Yes Yes Yes 7[/blue][/tt]
jamaarneen said:
[blue]KeyCode = 0: I understand that is meant to neutralize the key. so, I would like that ALL other keys should be ignored - should i put KeyCode = 0: without the 'IF' you wrote.[/blue]
If the inc/dec keys are to work while your in the field, then its necessary. Also the [blue]up/down arrow keys[/blue] are navigational and will force the focus to an adjacent field ...killing repeat! If you kill all other keys you won't be able to exit the control except thru the mouse. The choice is yours.
jamaarneen said:
[blue]If Trim(Me("FieldName") & " ") <> "" Then: I understand the purpose of this line, but why have added & " "? the trim function will trim it anyway?[/blue]
Yes your right ... at least in theory. The Idea as presented (besides trimming), is to return a [blue]zero length string[/blue] for comparing against [blue]<> ""[/blue]. Some time ago (I believe 2006) I had a situation where trim kept returning a null (not a null string). So the comparsion failed! At 2:30 AM (dead tired and my thought processes were incoherent, I thought I'd [blue]force it to work[/blue] by concatenating the space character. Its never failed since. I've seen [blue]trim[/blue] posted all over [blue]Tek-Tips[/blue] in the same way. I just don't know if it was for the same reason.
jamaarneen said:
[blue]SetPrevDate: it's a nice function, but what i need is just the opposite: [purple]I have to make sure that No date is repeated.[/purple][/blue]
I have to reserve an answer on this because in your post dated [blue]15 Feb 09 14:01[/blue] you state: [purple]it's about an order of a certain service that the client is requesting for one or more days -
sequential or non-sequential[/purple]. To at least start on the next day, you could:
Code:
[blue]Change: Me("FieldName") = rst("FieldName")
To Me("FieldName") = rst("FieldName") [purple][b]+ 1[/b][/purple][/blue]
jamaarneen said:
[blue]As DAO.Recordset: I am writing just 'As Recordset'. [purple]should i start adding 'DAO'? and why not 'ADO'?[/purple] (I'm a little confused with that one...).[/blue]
If your using [blue]A2k[/blue] or higher, yes to should be using DAO.
The use of DAO requires [purple]
Microsoft DAO 3.6 Object Library[/purple] to run. To [blue]check/install[/blue] the library, in any code window click [blue]Tools[/blue] - [blue]References...[/blue] In the listing find the library and [blue]make sure its checked.[/blue] Then using the up arrow, [purple]push it up as high in priority as it will go[/purple]. Click OK.
Were not using ADO because as you see I've addressed DAO! ADO is a different way handling objects than DAO and is geared better for networks.
jamaarneen said:
[blue]and one more... How do you format your text in your post so nicely? are there paragraph formatting?(I mean the first line hanging etc.)[/blue]
What you see is how my code formatted in the modules. The window you see in Tek-Tips comes from putting between [ignore]
[/ignore] ... a part of the TGML markup language, used in Tek-Tips. To see all of the TGML click the [blue]Process TGML[/blue] link at the bottom of any post your editing.
Its all a matter of grouping code approriately. My indent is set to 3 and any code that get nested is indented (Like the [blue]If Then Else End If[/blue] statements in [blue]On KeyDown[/blue] event.
Hope I covered it all!
[blue]Your Thoughts? . . .[/blue]
BTW: did you at least try the code to check out operations & navigation?
See Ya! . . . . . .
Be sure to see thread181-473997 [blue]Worthy Reading![/blue]
![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)
Also faq181-2886 [blue]Worthy Reading![/blue]
![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)