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 6328825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:31:52+00:00 2026-05-24T17:31:52+00:00

I have a database with two tables in it: People and Logs. I have

  • 0

I have a database with two tables in it: People and Logs.

I have created a Details page that displays Person information and additionally includes the associated logs records. All of this has just been done by adding a standard details page – not custom coding, etc.

When a user clicks on the green + to add a row to the Logs for that person I want to autopopulate a few of the columns. To do this I’ve opened the Log class and added the following:

Private Sub Log_Created()
     Me.Create_Date = Date.Now
End Sub

This works great. But I also want to pull in the card number associated with the person. In the end my code should look something like (pseudo):

Private Sub Log_Created()
     Me.Create_Date = Date.Now
     Me.CardNumber = SelectedPerson.CardNumber
End Sub

However, I’m not sure exactly how to accomplish this in code?

  • 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-24T17:31:54+00:00Added an answer on May 24, 2026 at 5:31 pm

    To avoid denormalized data (http://en.wikipedia.org/wiki/Database_normalization), I’d avoid setting up your data model like this. I’d take the approach of

    Person (Class)
     - Name
     - Address
     - ...
     - Cards (Collection of Card)
    
    Card (Class)
     - CardNumber
     - Person 
     - Logs (Collection of Log)
    
    Log (Class)
     - CreateDate
     - Card 
    

    This would allow for multiple cards per person. If you really want to do what you’re trying to do, you’re on the right track. Make sure that you have a relationship between Person and Log (one person to many logs), and your code would be

    Private Sub Log_Created()
         Me.Create_Date = Date.Now
         Me.CardNumber = Person.CardNumber
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two database tables that have a many to many relationship: People and
I have a database two tables and a linking table that I need a
Basically I have a database with two tables, that is, Updates table and Images
I have two tables in my database. A person and a coach table. The
I have a database with two tables - let's call them Foo and Bar.
I have a database with two tables, tblPlayers and tblMatches. tblPlayers contains the following
I have a database with two tables: data and file . file_id is a
I have two database tables with the following structure: actions: action_id int(11) primary key
I have a database framework where I have two tables. The first table has
In a MySQL database I have two tables linked in a join. One table

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.