Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Weekday Names
Mark Desens 
      
7 months ago
Hey guys I’m working on a continuous form that is connected to a query. The query has a date field called datetime and another called dayofweekname the I use to show the days of the week. In the form I have a combobox the is called cbodayname. Any way to use the combo box to filter the weekdayname in the query to show only the day of the week. So far I used several different methods including the bang one but to No prevail. I know there is a way but I’m not that advanced enough to figure it out. I’ve been using ChatGPT and Richard’s videos but still nothing.
Donald Blackwell  @Reply  
       
7 months ago
One thing, you shouldn't have a field name "DateTime" as it is a Reserved Word.

Beyond that, how is your combo box set up, is it just a list of day names, etc ("Monday";"Tuesday"....) or is it an enumerated list (1;"Monday";2;"Tuesday"....).

Then, are you using proper quoting in your query criteria for dayofweekname such as:

="""" & nz(FormName!cbodayname,"*") & """"

Query Criteria
Double Double Quotes
Filter Records
Find Record Combo

There are many more but these should cover your issue.

If not, show us screen shots of your query in design view as well as your combo box properties and the code you're trying to use to refresh the query.
Juan Rivera  @Reply  
            
7 months ago
Consider using the number for the day of the week Sunday is 1, day of week =1 should return Sunday????? Any thoughts.

Private Sub cmdGetDay_Click()
    Dim n As Long
    Dim dName As String

    If IsNull(Me!txtDayNumber) Then
        MsgBox "Please enter a number from 1 to 7.", vbExclamation
        Exit Sub
    End If

    n = CLng(Me!txtDayNumber)
    dName = DayNameFromNumber(n)

    If dName = "" Then
        MsgBox "Number must be between 1 and 7.", vbExclamation
    Else
        Me!txtDayName = dName
    End If
End Sub


So setting up a cbo is no more than making sure your autonumber starts on 1 and field Sunday than pass the value.
Alex Hedley  @Reply  
           
7 months ago
Glossary WeekdayName
Mark Desens OP  @Reply  
      
7 months ago
Thanks for the help, I need to let this go and return later. Other stuff more priority. Thanks again.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/17/2026 4:26:06 AM. PLT: 1s