Results 1 to 13 of 13
  1. #1
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    incorperating a combo in a query (A2000)

    I have asked a similar question before but because of being such a novice I may not have phrased the question to well. I have made a form in design mode and placed 1 unbound combo on it linked to 1 field (country) in a table tblCountry. I would like to somehow combine this with a query so that I can select a country from the drop down on the form, then to be asked to input a weight and then have a result based on details from 2 tables.

    I have attached a zip that may better show what I am trying to do, I know the example is wrong because it does not work but perhaps somebody could tell me in plain language how I should go about it.

    Cheers


    Steve
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: incorperating a combo in a query (A2000)

    The bound column of the combo box corresponds to CountryID, so the column in your query with the [Forms]![frmCountry]![cboCountry] condition should be CountryID, not Country.

  3. #3
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: incorperating a combo in a query (A2000)

    Hi Hans

    The CountryID is just an autonumber box, I have therefore changed the reference to the Country field but it still does not behave as a combo (I can still use the form/query but not as intended). Should I be making a seperate table that only has 1 entry which would be the primary key called Country (as it woud be unique anyway) and then join that in a query to the Country field in my other table.

    Sorry to bang but when I was living in Singapore a couple of years ago I had forms doing this but since being retrenched and back in the UK for 2 years not using Access I just cannot remember.

    Remember the old saying "Give a man a fish and he will eat for one day, tech a man to fish and he will eat for the rest of his life".

    Have a nice evening


    Steve

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: incorperating a combo in a query (A2000)

    I don't think we're on the same wavelength. Apparently you want something and I can't grasp what that is. I have attached a modified version of your database that demonstrates one way to use the form.
    Attached Files Attached Files

  5. #5
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: incorperating a combo in a query (A2000)

    Excellent, thank you Hans

    1. I have changed the

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: incorperating a combo in a query (A2000)

    You should set the Format to Currency, this will probably show
    Attached Files Attached Files

  7. #7
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: incorperating a combo in a query (A2000)

    Hi Hans

    That

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: incorperating a combo in a query (A2000)

    No idea, really. Check carefully that all names are spelled correctly; the smallest typo will cause #Name or #Error.
    Does the flashing in the Rate text box go away if you give this text box another name?

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: incorperating a combo in a query (A2000)

    What do you mean "Rate = Currency"? Are you trying to return a True/False value or what? Currency happens to be a datatype, so it isn't a good idea for a field name. What exactly are you doing there?
    Charlotte

  10. #10
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: incorperating a combo in a query (A2000)

    Hi

    Select Country, Select Weight, return Price (Rate) and Transit time

    Hope that makes it clearer

    Thanks

    Steve

  11. #11
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: incorperating a combo in a query (A2000)

    Thanks Hans & Charlotte

    All sorted now

    Steve

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: incorperating a combo in a query (A2000)

    So what was the cause, and the solution?

  13. #13
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: incorperating a combo in a query (A2000)

    Hi Hans

    Our old friends rushing, lack of attention to detail and assuming, basically in the query I had typed [forma] instead of forms and I had a RateBand mismatch a text looking for a number. Re-checking what you had done, where it was done and how it was done along with a little other helped solved it.

    I have made copiuos notes and hopefully it is all drummed into me. In about 20 years I may be able to answer somebody else's request.

    Cheers

    Steve

Posting Permissions

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