Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    50

    Unanswered: Tables or Querys

    Are there times when its better to use tables than querys, or is it better to always use querys? The reason I ask is that I have 2 forms, form 1 that edits adds and edits widgets, and form 2 that allows users to view info one widget at a time. Form 1 is tied directly to the widget info table & form 2 is tied to a widget info query because of filtering.

    On both forms I have a subform, from which I want to have the ability to add historical notes on the current record. widget info & widget history are 2 different tables. On the form tied to tables, I have been able to link the appropriate records via subdataname set to auto (info table{1} --> history table{many}). How can I do that with Queries?

    Thanks,

    Stace.
    Last edited by reoterq; 08-13-04 at 13:23.
    Thanks in advance or hope this helps.

  2. #2
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    in design view, click on your subform once. Fill in the Link Child Fields and Link Master Fields to link the two forms (and thus their backend tables).

  3. #3
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Hi Stace,

    On a personal note I myself prefer to use Queries. What I do it simply make a mirror image of the table in a query. For yourself only, tables may be ok, but with other users, I would advise steering away from allowing them access to your tables. Your entire structure can be affected by some unknowing user who has no knowledge of what they are doing. Besides, in queries you can do all you can in tables and more, like the Sorting and creating Calculated Fields and such. But as I said, that's a personal thing.
    It's kinda like this. You run a dynamite factory and you have a room full of open powder. Now, would you want all of the workers having access to that room to get what they need?? OR, would you think it best to have some way of funneling to them what they need when they need it, thereby safeguarding the entire stash?

    have a nice day,
    Bud

  4. #4
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    50
    Quote Originally Posted by jmrSudbury
    in design view, click on your subform once. Fill in the Link Child Fields and Link Master Fields to link the two forms (and thus their backend tables).
    Don't I need to pass the master query's current record primary id to a field in the child query's new record so that the field can be referenced to its appropriate master record?
    Thanks in advance or hope this helps.

  5. #5
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    You can use a parameterized query if you like. If you have onver a hundred thousand records, this may be a good idea for speed reasons, but did you try using the link master and link child fields properties of the subform? Using this link will allow the keys to be synchronized when adding new records.

  6. #6
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    50
    Yes, I have for example:

    Query 1 & Query 2, which are based on Table 1 & Table 2 respectively.

    Subdatasheetname on each table is [auto], but [auto] is not a choice for querys. What's the story?
    Thanks in advance or hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •