Enter "N/A" in a date field

M

Mac

I have a form set up with date fields for various tasks on
a checklist. I've set the date fields up with a pop-up
calendar. Is there an easy way to keep this format but
also allow for text (such as N/A) to be entered when dates
don't apply?

Thanks
Mac
 
D

Duane Hookom

You can set the format property of a text box to display N/A if the value is
null. For instance the format property could be set to:
Format: dd-mmm-yyyy;"";"";"N/A"
 
P

PC Datasheet

Put the following code where you open the form with the pop-up calendar control:
DoCmd.OpenForm "NameOfCalendarForm",,,,,acDialog
If <<Some condition >> Then
Me!NameOfTextBox = Forms!NameOfCalendarForm!CalendarName.Value
Else
Me!NameOfTextBox = "N/A"
End If
DoCmd.Close acForm, "NameOfCalendarForm"

Put the following code in the AfterUpdate event of the calendar control:
Me.Visible = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Date field format 3
Formatting dates in text field 18
Basic form and subform question 6
Date Fields 2
Access Daily Entry with multiple entries per field 0
Outlook Creating an Outlook form 2
Problem filtering records using date 4
Tasks 7

Top