Results 1 to 10 of 10

Thread: Query w/form

  1. #1
    Join Date
    Jun 2002
    Location
    Houston, TX
    Posts
    116

    Unanswered: Query w/form

    I have a query that is using a form to get the user to fill in the blank. But how can I get the query/form to use like a lookup or a drop down box? I've tried making my form a combo box - but the query doesn't seem to incorporate that????? All help is greatly appreciated.

    Thanks . . .
    texasalynn

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    it works fine, but maybe YourCombo isn't doing what you think it is. try a little experiment:

    Private Sub YourCombo_AfterUpdate()
    msgbox "The combo value is: " & YourCombo.Value
    end sub

    ...that's what your query will see if you use the combo as criteria. if it's not what you expected, check out YourCombo properties ¦ data ¦ bound column

    izy

  3. #3
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820

    Re: Query w/form

    Originally posted by texasalynn
    I have a query that is using a form to get the user to fill in the blank. But how can I get the query/form to use like a lookup or a drop down box? I've tried making my form a combo box - but the query doesn't seem to incorporate that????? All help is greatly appreciated.

    Thanks . . .
    texasalynn
    how are you useing the query, this query uses the value in the combos S_Date ,E_Date on the form GBPackaging and this is done with the values

    [forms].[GBPackaging].[S_Date]
    [forms].[GBPackaging].[E_Date]


    SELECT types.Type, Sum([Weight])/1000 AS [Weight(tonnes)]
    FROM types INNER JOIN TotalPack ON types.Code = TotalPack.Type
    WHERE (((Left([SHIP_TO],2)) Like "GB") AND ((TotalPack.ICEDATE) Between [forms].[GBPackaging].[S_Date] And [forms].[GBPackaging].[E_Date]) AND ((TotalPack.Weight)>0))
    GROUP BY types.Type;
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  4. #4
    Join Date
    Jun 2002
    Location
    Houston, TX
    Posts
    116
    I have this, but when I open my form it is blank???

    Any clues?

    Thanks. . .

  5. #5
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    email a copy of it to removed and i'll take a look and see if i can see you problem
    Last edited by m.timoney; 03-20-03 at 07:49.
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  6. #6
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    Originally posted by texasalynn
    I have this, but when I open my form it is blank???

    Any clues?

    Thanks. . .
    hold on the form is blank? do you mean totally blank or nothing but header and footer?

    if total blank i ain't a clue whats happerning but will try to find out if blank bar head and foot then it isn't finding any data to display which might mean to need to requery the form after changing the combo box value or setting the query to show all results on a null combo box
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  7. #7
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820


    okay let me knoe if thats fixed it
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  8. #8
    Join Date
    Jun 2002
    Location
    Houston, TX
    Posts
    116
    OK - I got that, but now I'm trying another one (Entity) but it isn't populating the drop down box.

    I did one after you sent where I had gone off and it works beautifully (account). I'm wondering if it's because the one I trying to do now is a numeric field and where the others where alpha fields.

    Thanks for the help.

    texasalynn

  9. #9
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    that might cause problems if your still trying to use wild cards but otherwise it shouldn't, unless of cause you've created another circular reference in this query like you had originaly you shouldn't have a problem
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  10. #10
    Join Date
    Jun 2002
    Location
    Houston, TX
    Posts
    116

    Solved Query w/form

    Well I you were right I had the circular reference again. All seems to be working now. Thanks for the help

    texasalynn

Posting Permissions

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