Is it possible to restrict only to select dates on a textbox? (1 Viewer)

prabha_friend

Prabhakaran Karuppaih
Local time
Today, 09:42
Joined
Mar 22, 2009
Messages
904
I don't want to let the users to enter dates but only to select. How to do it?
 
Select one date?, multiple dates?

If one use a combo box, ir more than one, use a multi select listbox

Populate the control from where ever you keep your dates.
 
on design view of your form, click on the textbox control.
on the Property Sheet->Format->Short Date

go to Event tab of the Property Sheet and select Keypress event. on the vbe

Private Sub yourTextboxName_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
 
on design view of your form, click on the textbox control.
on the Property Sheet->Format->Short Date

go to Event tab of the Property Sheet and select Keypress event. on the vbe

Private Sub yourTextboxName_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub

For my benefit please?

Wouldn't be easier to just lock the control for that effect?
 
i tried locking the control, put it wouldn't insert the date from the pop-up calendar.
 
i tried locking the control, put it wouldn't insert the date from the pop-up calendar.

Ah I see, I have no access to the DB, so did not realise he was using a calendar control.

Thank you.
 
Select Pre-Existing dates within your database's records. or
Select from a date-time picker?
 

Users who are viewing this thread

Back
Top Bottom