Re: Question on displaying repeating data

From: Dirk Goldgar (dg_at_NOdataSPAMgnostics.com)
Date: 04/08/04


Date: Thu, 8 Apr 2004 11:50:08 -0400


"Rich" <rstringer@provide.net> wrote in message
news:eq1Ss4XHEHA.2580@TK2MSFTNGP12.phx.gbl
> Hello,
>
> I am developing a financial application that tracks various aspects
> of the stock and financial markets. I am currently developing it
> using Access 2003 although eventually, all the data will reside in
> SQL Server. Access will still provide the UI.
>
> On 1 form, which has to sections (top and bottom), I want to
> enter/display opening and closing stock prices for a given company.
> On the bottom half of the same form, I want to display a given number
> of historical opening/closing prices. The list will be in reverse
> order based on the current. For example, the last 10 days beginning
> yesterday. There will be a text box so the user can input the number
> of historical quotes. The query logic is relatively simple.
> Something like:
> Select date, opening_quote, closing_quote
> from tbl_daily_quotes
> where date is in (today's date - 10 days). I obvisously don't know
> the SQL syntax here, but I think the meaning is clear.
>
> My problem is that I don't know how to display this. How can I set
> up what I imagine is basically an array or table to display the data?
>
> Also, a little help in getting my SQL Syntax is also appreciated.
>
> Many thanks in advance,
>
> Rich

A subform in continuous view seems the most likely way to display this
information. The subform's recordsource would be the query that returns
the last 10 days of quotes. You don't actually say, but would these be
quotes for the specific company that is shown on the main form? Then
you'll need to include the company code (or other identifier) in the
query and use the Link Master/Child Fields of the subform control to
identify that field on the main form and subform. Your query would look
something like this:

    SELECT CompanyCode, StockDate, Opening_Quote, Closing_Quote
    FROM tbl_Daily_Quotes
    WHERE StockDate >= DateAdd("d", -10, Date())

-- 
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)


Relevant Pages

  • Re: Displaying fields in a stock table
    ... Hi Steve. ... added a non visible column that was bases on StockID in the Stock Table. ... various forms linked to the Query allong with the correct Serial Numbers ... Box to display the Make/ Model text that is associated with the ID by ...
    (microsoft.public.access.gettingstarted)
  • Conditional data display
    ... Create a query in access to count your locations. ... Use the FrontPage Database Results Wizard to display the ... Records Returned" to "Out of Stock". ... One lists nursery stock and the ...
    (microsoft.public.frontpage.programming)
  • Re: Displaying fields in a stock table
    ... in the stock Table and I added the Stock Table ID but did not male it visible ... in the query design view. ... table and ModelID joined to ModelID in the Model table. ... Box to display the Make/ Model text that is associated with the ID by ...
    (microsoft.public.access.gettingstarted)
  • Re: Query "Expression Problem"
    ... The query still displays ... Rich ... >This should display all records with a Deadline Date ...
    (microsoft.public.access.queries)
  • Re: Displaying fields in a stock table
    ... Your Stock table looks something like this: ... table and ModelID joined to ModelID in the Model table. ... In your query, include all three tables. ... Box to display the Make/ Model text that is associated with the ID by ...
    (microsoft.public.access.gettingstarted)