Results 1 to 5 of 5
  1. #1
    agure is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2014
    Posts
    30

    Search Form Problems

    Greetings,

    So i've run into quite some issues with access.

    The main issue i'm assuming is because the field type is not proper.



    I created a query with Like statements pointing to text boxes in a search form. Searching works great except when the lookup column is involved. When I involve the lookup column I fail to get the results im looking for. The lookup column is supposed to be a text field but it shows up in table properties as a number field could this be a problem. Can someone guide me to a proper method of searching and created reports for that search.

    Also my searching technique may not be proper I create a normal table and that one table has 2 queries , 1 query i use for the search with the like statements and the other query I use for the normal form. IS it possible to have just a normal query and create a search as a filter from the report and not as a filter from the query??



    Thanks in advance... .

  2. #2
    agure is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2014
    Posts
    30

    Question

    Update ( i am trying to filter in the button code for opening report)

    I created 2 combo boxes and a button. Both values lookup text values from two different tables. Now im getting data type mismatch when i press the search button

    DoCmd.OpenReport "Income Report", acViewPreview, , "[Invoice#]='" & Me.invoicex & "' And [Truck#]='" & Me.truckx & "'"

    I believe that the problems im facing is because somehow access is storing lookup values as number values

  3. #3
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    It's possible in MS SQL, but not sure about access to do a Like on numeric fields... either way it is HIGHLY frowned upon due to CPU usage to perform due to implicit casting.

  4. #4
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    Are Invoice# and Truck# text or numeric fields?

  5. #5
    agure is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2014
    Posts
    30
    Quote Originally Posted by Xipooo View Post
    Are Invoice# and Truck# text or numeric fields?
    They are both Text Fields.

    I noticed that when I create the combobox for the invoice# I get just 1,2,3,4,5 etc instead of getting the text I wanted it's somehow converted into a numerical. This is probably the root of my issue. Which makes no sense to me.

    I have Trucks table, Jobs Table, Final Table

    In Final Table---> Truck# is looked up from Trucks Table
    In Final Table---> Invoice# is looked up from Jobs Table

    Both Fields are Text Fields.

    When Created combo box values show properly for Truck# but for Invoice# it shows up as numbers.

    When Creating report without any search Truck# and Invoice# show up perfectly fine . This makes no sense to me !!!!!!!!!

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

Similar Threads

  1. problems with search as you type forms
    By sk88 in forum Access
    Replies: 1
    Last Post: 06-27-2012, 02:01 PM
  2. Replies: 1
    Last Post: 04-20-2012, 03:16 AM
  3. Few Problems : Search Button Form
    By spideynok in forum Forms
    Replies: 10
    Last Post: 03-29-2012, 01:13 AM
  4. SEARCH problems with Access and MySql
    By azirion in forum Access
    Replies: 2
    Last Post: 08-27-2011, 05:02 PM
  5. Replies: 4
    Last Post: 01-11-2010, 11:41 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