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

  • Home
  • SEARCH
  • 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 6955989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:48:33+00:00 2026-05-27T14:48:33+00:00

I have created a simple application where I fetch questions from an Access database

  • 0

I have created a simple application where I fetch questions from an Access database and store the answers to another Access database. I am not sure how many questions client would like to ask, so I can’t hardcode that number.

So, column names for answers table (besides user information like first, last name and so on) will be a1, a2, a3 … aN.

And finally the problem!

For testing purposes I have hardcoded saving first 3 answers like this:

newEntry.a1 = answers(0)
newEntry.a2 = answers(1)
newEntry.a3 = answers(2)

Now I would like to iterate through all properties based on count of “a-type” properties:

'aCount is number of "a-type" properties
For i = 0 To aCount - 1
    Dim property As String
    property = "a" & (i + 1)
    newEntry.property = answers(i)
Next

Of course, above code does not work, it is just a pseudo-code idea that “should” to the same as my hardcoded example.

Is it possible to iterate through predefined properties of newEntry object in that manner?

I hope my question was clear enough. Thank you very much in advance!

  • 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. Editorial Team
    Editorial Team
    2026-05-27T14:48:34+00:00Added an answer on May 27, 2026 at 2:48 pm

    Yes there is using reflection, you’d be better off using a collection to store your answers.

    lots of ways you could do it, but

    Dictionary<String,List<String>> would be an easy first choice then
    

    PSEUDO Code

    for(int index = 0; index<aCount; index++)
    {
      newEntries.Add["A"].Add(answers[index]);
    }
    

    so A4 is simply newEntries[“A”][3];

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a simple silverlight application to display some text at realtime from
I have created the Simple Application of the sqlite database. In which i am
I have created a simple application of reading mail properties from a nsf file
I have created a simple blog application with Ruby on Rails. The applications consists
I have created a simple win 32 application..in which it has a textbox and
I created a simple ASP.NET MVC version 1.0 application. I have a ProductController which
I have created a simple Facebook application in PHP, that greets user by there
I have created a simple hello world application in xcode using the command line
I have created a simple API for a Rails application using token-based-authentication that supports
I am working on my second CI application. I have created some simple CRUD

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.