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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:11:41+00:00 2026-06-06T13:11:41+00:00

compliment of the day. Based on the previous feedback received, After creating a Ticket

  • 0

compliment of the day.
Based on the previous feedback received,

After creating a Ticket sales database in MS Access. I want to use a single form to Query the price of a particular ticket at a particular month and have the price displayed back in the form in a text field or label.

Below are sample tables and used query

CompanyTable

CompID    CompName
   A        Ann
   B        Bahn
   C        Can
   KK       Seven
   -        --

TicketTable

 TicketCode    TicketDes

 10            Two people
 11            Monthly
 12            Weekend
 14            Daily

TicketPriceTable

 ID    TicketCode    Price    ValidFrom

  1    10            $35.50    8/1/2010
  2    10            $38.50    8/1/2011
  3    11            $20.50    8/1/2010
  4    11            $25.00    11/1/2011
  5    12            $50.50    12/1/2010
  6    12            $60.50    1/1/2011
  7    14            $15.50    2/1/2010
  8    14            $19.00    3/1/2011
  9    10            $40.50    4/1/2012

Used query:

SELECT TicketPriceTable.Price
 FROM TicketPriceTable
 WHERE (((TicketPriceTable.ValidFrom)=[DATE01]) AND ((TicketPriceTable.TicketCode)=[TCODE01]));
  • In MS Access, a mini boxes pops up to enter the parameters when running the query. How can I use a single form to enter the parameters for [DATE01] and [TCODE01]. and the price displayed in the same form in a textfield (For further calculations).

Such as ‘Month’ field equals to input to [DATE01] parameter
‘Ticket Code’ equals to input for [TCODE01] parameter
Textfield equals to output of the query result (Ticket price)

  • If possible, I would like to use only the Month and Year in this format MM/YYYY.The day is not necessarry. How can I achieve it in MS Access?

If any question, please don’t hesitate to ask
Thanks very much for your time and anticipated feedback.

  • 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-06-06T13:11:42+00:00Added an answer on June 6, 2026 at 1:11 pm

    Entering up to 300 different types of tickets

    Answer to your comment referring to Accessing data from a ticket database, based on months in MS Access)

    You can use Cartesian products to create a lot of records. If you select two tables in a query but do not join them, the result is a Cartesian product, which means that every record from one table is combined with every record from the other.

    Let’s add a new table called MonthTable

    MonthNr    MonthName
        1      January
        2      February
        3      March
      ...      ...
    

    Now if you combine this table containing 12 records with your TicketTable containing 4 records, you will get a result containing 48 records

    SELECT M.MonthNr, M.MonthName, T.TicketCode, T.TicketDes
    FROM MonthTable M, TicketTable T
    ORDER BY M.MonthNr, T.TicketCode
    

    You get something like this

    MonthNr    MonthName   TicketCode  TicketDes
        1      January         10      Two people
        1      January         11      Monthly
        1      January         12      Weekend
        1      January         14      Daily
        2      February        10      Two people
        2      February        11      Monthly
        2      February        12      Weekend
        2      February        14      Daily
        3      March           10      Two people
        3      March           11      Monthly
        3      March           12      Weekend
        3      March           14      Daily
      ...      ...            ...      ...
    

    You can also get the price actually valid for a ticket type like this

    SELECT TicketCode, Price, ActualPeriod AS ValidFrom
    FROM (SELECT TicketCode, MAX(ValidFrom) AS ActualPeriod
          FROM TicketPriceTable
          WHERE ValidFrom <= Date
          GROUP BY TicketCode) X
        INNER JOIN TicketPriceTable T
            ON X.TicketCode = T.TicketCode AND X.ActualPeriod=T.ValidFrom
    

    The WHERE ValidFrom <= Date is in case that you entered future prices.

    Here the subquery selects the actually valid period, i.e. the ValidFrom that applies for each TicketCode. If you find sub-selects a bit confusing, you can also store them as query in Access or as view in MySQL and base a subsequent query on them. This has the advantage that you can create them in the query designer.

    Consider not creating all your 300 records physically, but just getting them dynamically from a Cartesian product.

    I let you put all the pieces together now.

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

Sidebar

Related Questions

Integrating SimpleModal with ASP.NET I want to thank Eric for producing SimpleModal and compliment
I have been asked to write a compliment website/service for an iPhone app. The
I have a number (hex) and I want the one's complement of it. For
To compliment an existing smorgasbord of arrangements between phpunit,autoload and namespace is this: I
I have decided to develop a native iPhone apps as a compliment to our
I need to multiply an integer (two's compliment) by a floating point constant. Here
The System.Threading.ConcurrentQueue.TryDequeue method threw an exception the other day that took me totally by
Does the Date object in Javascript ever use a non-Gregorian calendar? The MDN and
I'm trying to subtract two values from each other using twos compliment. I have
From Schaums C++ text Removal of goto- says use a flag code segment: const

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.