Clicking Command Button to make label visible

  • I have a command button that has the caption "Received Date". When it is clicked, I want a label to appear with the current date. Otherwise, the label is invisible.

    How do I get this to run separately for each record? As I have it now, each record has the same date.


  • Same Question

    Can I link a control to something that happens in the form.

    What I have done is to use the Calander control. I click a button and the Calendar value date appears in a label.

    How can I this date to appear on the table. As of now, the two aren't bound together so if I update one, the other will not update.


  • Re: Same Question

    Just use the "SelChange" event of the calendar to update the label. Assuming your calendar control is called "calDate" & your label is called "lblDate":

    Private Sub calDate_SelChange(ByVal StartDate As Date, ByVal EndDate As Date, Cancel As Boolean)
    '   Update date label
        Me.lblDate = Me.calDate.Value
    End Sub

    Put this in the code module for the user form.

    Let me know if this is what you were looking for.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!