Re: Field Name Query Help



On Thu, 21 Jul 2005 01:12:56 GMT, TJ <tj@xxxxxxxx> wrote:

>John,
>
>I am storing Brand Names in a table called ToBrand. On a Form called Main
>Menu, there is a Combo Box linked to ToBrand. The user selects the ToBrand
>in the Combo Box, i.e. Brand1, Brand2, etc.
>
>The idea is that when a certain query runs, one of the fields in the query
>grid gets the ToBrand value from the Combo Box. The query queries a Table
>called Cross Detail which has 220K records and 12 fields of data. Some of
>the fields would be Brand1, Brand2, etc. The query would use the field in
>the Cross Detail Table based on the selection in the Combo Box.

Then as John Spencer says, your only choice is to build a SQL string
in code.

If you ever have to handle a thirteenth or fourteenth brand, what will
you do? Redesign your tables, all your queries, all your forms, all
your reports!? This design is simply incorrect; if you have a Many
(whatever) to Many (brands) relationship, you should have one RECORD
for each brand rather than one field.

John W. Vinson[MVP]
.



Relevant Pages

  • Re: Batch importing data for new and updated records.
    ... Use that query to populate your real table. ... > I need to setup a way to import batches of new inventory. ... I cannot import/append to one table as my import data ... > has the actual location names, serial#, model names, and brand names. ...
    (microsoft.public.access.gettingstarted)
  • Re: Field Name Query Help
    ... I am storing Brand Names in a table called ToBrand. ... The idea is that when a certain query runs, one of the fields in the query ... the Cross Detail Table based on the selection in the Combo Box. ...
    (microsoft.public.access.queries)
  • Re: Sub-form breaks when adding query
    ... I was able to concatenated using a Query, ... > your two tables: Brand and DealDate. ... >>concatenates the first four letters of the brand field ... >>with the dealdate field in the DealStructure table. ...
    (microsoft.public.access.gettingstarted)
  • Re: highest percenatage
    ... Build One query with customer ID, brand, and Count, in another ... this query in your original by customer ID, pull down the brand field. ...
    (comp.databases.ms-access)
  • Re: Enter multiple Parameters for a Field
    ... query only pulls information for that one brand. ... This is what my criteria currently looks like: ...
    (microsoft.public.access.queries)