A text box and a date.

[b][red]This message was edited by anglico at 2004-8-7 18:0:3[/red][/b][hr]
I have a table MainEntry_2 with a form called MAINENTRY that's basically just a gui for the table.
I want to enter an order into the form, leaving TB_Result_Received(A text box) empty. Then when I get the results, call up the order again and double click the TB_Result_Received box and have the current date automatically entered,then click again to clear the date, however, have the ability to type in a different date, just in case it's not today.
The text box's (TB_Results_Received) control source is RESULT_RECEIVED (The field in the table)
I have tried a on Dbl Click =Date(),- Didnt work,this really surprised me.
I have tried a macro,(Below) - didn't work
Condition:Not IsNull([Forms]![MAINENTRY]![TB_Results_Received])
Action: Set Value

Item:[Forms]![MAINENTRY]![TB_ResultsRec]
Expression: =Date()

Why wont this work? I realize this is a newbie question, but any help would be appreciated. Thank you in advance.


Comments

  • : [b][red]This message was edited by anglico at 2004-8-7 18:0:3[/red][/b][hr]
    : I have a table MainEntry_2 with a form called MAINENTRY that's basically just a gui for the table.
    : I want to enter an order into the form, leaving TB_Result_Received(A text box) empty. Then when I get the results, call up the order again and double click the TB_Result_Received box and have the current date automatically entered,then click again to clear the date, however, have the ability to type in a different date, just in case it's not today.
    : The text box's (TB_Results_Received) control source is RESULT_RECEIVED (The field in the table)
    : I have tried a on Dbl Click =Date(),- Didnt work,this really surprised me.
    : I have tried a macro,(Below) - didn't work
    : Condition:Not IsNull([Forms]![MAINENTRY]![TB_Results_Received])
    : Action: Set Value
    :
    : Item:[Forms]![MAINENTRY]![TB_ResultsRec]
    : Expression: =Date()
    :
    : Why wont this work? I realize this is a newbie question, but any help would be appreciated. Thank you in advance.
    :
    :
    :
    well you're on the right track, Do this...

    on the DoubleClick event for your textbox should look something like this...
    ======================================================================
    Private Sub txtDate_DblClick()

    txtDate = Now()

    End Sub

    to clear the textbox...

    Private Sub txtDate_Click()

    txtDate = ""

    End Sub


    keep it simlpe
    regards,


    NetWiz
    Salient Technologies



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion