Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

value single field not changeable

Status
Not open for further replies.

phpatrick

Programmer
Jul 9, 2006
72
BE
Code:
If Forms![F_00_AR_FICHE_DAG]![F_02_AR_FICHE_TIMEDAG].Form![SHIFT1VAN] > #12:00:00 AM# Then
    Else
  Forms![F_00_AR_FICHE_DAG]![F_02_AR_FICHE_TIMEDAG].Form![SHIFT1VAN] = Format(Time(), "Short Time")
    End If
End Sub

hi, this works, but little problem remain : the field is not updated on click if the value is > then the default value = correct however, the user still can change the value by typing. How can I avoid this, any id ?
 
How are ya phpatrick . . .
Microsoft said:
[blue]A [purple]Date Data Type[/purple] is stored as IEEE 64-bit (8-byte) floating-point numbers that represent dates ranging from 1 January 100 to 31 December 9999 and [purple]times from 0:00:00 to 23:59:59[/purple].[/blue]
The integer portion is the date with [blue]the decimal portion representing time[/blue].

Realize a decimal of zero represents a time of [blue]12:00:00 AM[/blue]. Your code simply bypasses updating the field for the one second the time changes to [blue]12:00:00 AM[/blue] and then advances to [blue]12:00:01 AM[/blue] . . . and since <0 is a negative value . . . [blue]So any time you click this button (except for that one second) the field will update![/blue] A little rethinking is in order here.

[blue]Your Thoughts?[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top