Access Question

Soldato
Joined
8 Oct 2005
Posts
4,185
Location
Midlands, UK
Hi,

Have two quick questions :)

I have just come accross the calender v11 active x plugin. How do i make it so a selected date will be outputted to a say a text box?

I also have a a drop down box with several options available. If the user was to select a certain option from this list (e.g. "Other") how would i make a text box appear to the right of this in order for the user to enter a value for "other"......if that makes sense :)

Thanks for any input.
 
Associate
Joined
20 Jan 2005
Posts
386
Location
Crewe, Cheshire
OK,

For your calendar check out this link here.

If you want it in a textbox simply change your code to the name of your textbox, and take out the code for displaying the calendar.

For the drop down box use something like the following in the click event of your drop down box:

Code:
Select Case Me.DropDownBoxName.Value
Case "Other"
Me.TextBoxName.Visible = True
End Select

I think that will work anyway.
 
Last edited:
Soldato
OP
Joined
8 Oct 2005
Posts
4,185
Location
Midlands, UK
KevinCB said:
OK,

For your calendar check out this link here.

If you want it in a textbox simply change your code to the name of your textbox, and take out the code for displaying the calendar.

For the drop down box use something like the following in the click event of your drop down box:

Code:
Select Case Me.DropDownBoxName.Value
Case "Other"
Me.TextBoxName.Visible = True
End Select

I think that will work anyway.


hmm, this seems silly that it wont work as its simple VB. :(

I have made a quick db with two forms descrbing my problem. If anyone could have a look i love you forever and ever :)

http://members.lycos.co.uk/rjallport/pcadvisor.mdb (.mdb file, ~ 200 KB)

Thanks for any input
 
Associate
Joined
18 Dec 2002
Posts
1,542
Location
Cardiff
Code:
Private Sub lstBox_AfterUpdate()

    If Me.lstBox.Value = "Other" Then
        Me.txtBox2.Visible = True
    End If

End Sub
Set txtBox2 Visible to No as standard first.

Or in the case above (probably better)
Code:
Private Sub lstBox_AfterUpdate()

    Select Case Me.lstBox.Value
        Case "Other"
            Me.txtBox2.Visible = True
    End Select

End Sub
 
Last edited:
Soldato
OP
Joined
8 Oct 2005
Posts
4,185
Location
Midlands, UK
Mirage said:
Code:
Private Sub lstBox_AfterUpdate()

    If Me.lstBox.Value = "Other" Then
        Me.txtBox2.Visible = True
    End If

End Sub
Set txtBox2 Visible to No as standard first.

Or in the case above (probably better)
Code:
Private Sub lstBox_AfterUpdate()

    Select Case Me.lstBox.Value
        Case "Other"
            Me.txtBox2.Visible = True
    End Select

End Sub

Good stuff, that worked. Thanks again.

I got the calender working too, using this link. Although im still unsure how to set the default date to todays date on the calender control.
 
Back
Top Bottom