Results 1 to 5 of 5
  1. #1
    MWB is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2010
    Posts
    11

    Putting an Expression in a Field Box


    Hey all,

    I was wondering if it was possible to put an expression in the field box of a query?

    Here is what im trying to do. I have a report that is based off six columns of a query. The first five columns are basic information like product name, part number, department, manufacturer, and region. I would like give the user the ability to change the variable that the 6th column contains. The query is based off a table with around 200 different fields. I would like the user to be able to define which of these 200 variables fits in the last spot on the report.

    I'm not sure if this is possible so i figured this would be a good place to look for tips.

    Right now here is what I have.

    Query: Main Query (Based off the table Basic Program Info)
    Table: Basic Program Info
    ComboBox: The rowsource of this combo box is Basic Program Info, and the row source type is Field List.

    The query has 6 columns. The first five are Product, Part Number, Department, Manufacturer, and Region.

    For the 6th column, I am trying to write and expression as the Field. Right now I have Form![Product Search].ComboBox, but that doesn't seem to work.

    Does anybody know how I could make this work or are there any other ideas I could try?

  2. #2
    MWB is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2010
    Posts
    11
    I have also tried to make a text box on the Report that had a text with with the control source Form![Customer Info Search].ComboBox but it just prints as #Name?

  3. #3
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    a table with around 200 different fields

    ?? do you mean a field with a list of 200 possible values?

    from your post, which is not clear to me admittedly, it sounds like you want to a new 6th field to your table itself - and set it up as a LookUp field to another list table that holds the 200 values - - so that your user can select the value that is appropriate.

    hope this helps.

  4. #4
    MWB is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2010
    Posts
    11
    Sorry for the confusion. That is exactly what I am trying to do. How would I go about setting up a LookUp field?

  5. #5
    MWB is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2010
    Posts
    11
    Actually now that I look at it, the LookUp function seems to be used to link tables together. I'm not sure if that will work for what I am trying to do.

    Essentially, I am going to have a report that has three values on it.

    Report
    --------
    Product Type: Value
    Part Number: Value
    Field Chosen By User: Value

    So for each product we have it will report a product type and part number. The third field, labeled "Field Chosen By User" above, can change depending on what the user wants. The main table for the database has about 200 values such as Product and Part Number, so i would like the user to be able to chose form any of the 200 variables to be the 3rd item on the report. This way we can quickly compare a given feature between all of our products. We will be able to print out a report that will report each products part number and product name, and then maybe use the 3rd box to display the weight of each product to look for trends.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 05-04-2019, 09:02 PM
  2. Replies: 0
    Last Post: 07-14-2010, 04:01 PM
  3. Putting a Finished Database up on the Network
    By Imgsolutions in forum Access
    Replies: 1
    Last Post: 07-14-2010, 03:56 AM
  4. Replies: 7
    Last Post: 12-30-2009, 11:03 AM
  5. Field gets data from Expression?
    By Willot in forum Access
    Replies: 3
    Last Post: 12-10-2005, 06:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums