Weekdayname

  • Thread starter Thread starter Garry Jones
  • Start date Start date
G

Garry Jones

I am using Weekday name.

(Syntax)
=WeekdayName(weekday[,abbreviate[,firstdayofweek]])

I have tried it in a form and in a query but it runs on all values and
not just the ones that are filled in. My problem is that some dates are
optional and I do not wish to run this if the field is empty.

How do I stop this from running on empty fields?

In queries?
In forms?

Any help appreciated...

Garry Jones
Sweden
 
I am using Weekday name.

(Syntax)
=WeekdayName(weekday[,abbreviate[,firstdayofweek]])

I have tried it in a form and in a query but it runs on all values and
not just the ones that are filled in. My problem is that some dates are
optional and I do not wish to run this if the field is empty.

How do I stop this from running on empty fields?

In queries?
In forms?

Any help appreciated...

Garry Jones
Sweden

You've given us the syntax from VBA Help, but you haven't given any of
your actual filled in values.
WeekdayName requires the day's number value, 1-7.
= WeekdayName(2,True) will return Mon.
= WeekdayName(2,False) will return Monday.

If you just wish to show the name of the day of a Date DATATYPE Field,
just set the control's format property to
dddd to get Monday
or
ddd to get Mon

or use
=Format([DateField],"dddd")
 
IIF(IsNull([YourDateField]) = True, Null,
WeekdayName(weekday[,abbreviate[,firstdayofweek]]))
 
fredg said:
You've given us the syntax from VBA Help, but you haven't given any of
your actual filled in values.


Sorry, I didn't want to confuse anyone, I am on Swedish Access and there
are some differences in coding. Among other things commas are replaced
by semi colons in "if" formulars.

"IIF(IsNull([YourDateField]) = True, Null, " trick with some
modifications did the trick. Never seen the double "I" in IF before, it
translated to Swedish as a double O in OOM (om), the Swedish for IF.

Thanks for your help.

Garry Jones
Sweden
 

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

Back
Top