Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 183753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:10:18+00:00 2026-05-11T15:10:18+00:00

I have tried to use ENUMS in my code for Access 2007. But it’s

  • 0

I have tried to use ENUMS in my code for Access 2007. But it’s very uncomfortable. May be it’s better to use collections ?

My code isn’t working is such way I thought it would be useful.

Public Function       GetEnumId(Name As String, ReferenceTable As String) As Long         Dim rs As DAO.RecordSet          Set rs = CurrentDb.OpenRecordset('Select * From ' & ReferenceTable & _                     ' Where Name= '' & Name & ''')         GetEnumId = rs('ID')          rs.Close      End Function      ' Doesn't work because of wrong type params     Public Function GetEnumName(ID As Long, ReferenceTable As String) As String         Dim rs As DAO.RecordSet          Set rs = CurrentDb.OpenRecordset('Select * From ' & ReferenceTable & _                     ' Where ID= '' & ID & ''')         GetEnumName = rs('Name')          rs.Close      End Function 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:10:19+00:00Added an answer on May 11, 2026 at 3:10 pm

    Isn’t ID a number? Then don’t wrap it in quotes:

    Set rs = CurrentDb.OpenRecordset('Select * From ' & ReferenceTable & _             ' Where ID= ' & ID ) 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 263k
  • Answers 264k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Problem Solved: The problem was not with the page-directives at… May 13, 2026 at 12:08 pm
  • Editorial Team
    Editorial Team added an answer Each reports the version of the program it's running. java… May 13, 2026 at 12:08 pm
  • Editorial Team
    Editorial Team added an answer Here's the fundamental reason why the stream operators have to… May 13, 2026 at 12:08 pm

Related Questions

I have tried to use ENUMS in my code for Access 2007. But it's
I have a program i frequently use that is made with .NET. This program
I need to convert an enumeration member (its value, not the identifier) to a
I'm trying to use Prism and the MVVM pattern to develop an application. In
I need to have the ability to select multiple values as is the nature

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.