Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228

    query returning ' for no apparent reason.

    I'm hoping the reason is apparent to someone else here.



    I want PONUM to display the ID number of that PO. As a test I have used the same query criteria to show the relating record.
    Click image for larger version. 

Name:	Screenshot_1.png 
Views:	15 
Size:	7.6 KB 
ID:	30053


    This is the result:

    Click image for larger version. 

Name:	Screenshot_2.png 
Views:	15 
Size:	3.6 KB 
ID:	30054
    as you can see it should read 39 in both. But PONUM shows only the apostrophe '.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    ive found using controls as a query text will do that.
    try Clng(forms![add time]![Po_ID])
    or
    CStr(forms![add time]![Po_ID])

    this can help it show.
    (or add it as a query parameter)

  3. #3
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    Oddly, Chr$(39) is an apostrophe.
    Take a look at the SQL for the query.
    It'll be something like
    Code:
    SELECT [Forms]![add time]![PO_ID], PO_engineers.PO_ID FROM PO_engineers;
    Obviously [Forms]![add time]![PO_ID] is not a field in your table.
    Maybe
    Code:
    SELECT Eval(Forms![add time]!PO_ID) AS PONUM, PO_engineers.PO_ID FROM PO_engineers;
    would work.

  4. #4
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    Can you just use the PO_ID field from table?
    PONUM: [PO_ID]

    Is that form open and if so, is the 39 value showing or an apostrophe in that field?

  5. #5
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    thanks a lot

  6. #6
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Bulzie I didn't see your reply until now. This is on an unbound form for the most part. I was having other errors when it was bound.

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

Similar Threads

  1. Replies: 17
    Last Post: 08-22-2017, 08:43 PM
  2. Replies: 16
    Last Post: 07-25-2016, 07:42 AM
  3. Replies: 1
    Last Post: 11-05-2014, 05:35 PM
  4. Replies: 3
    Last Post: 02-27-2014, 10:50 AM
  5. Replies: 2
    Last Post: 03-28-2013, 12:32 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