Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    I don't get any errors opening it on my work laptop. At home since I use 2010, I do get the date error. I have to change the VBA references from Missing MS Office 15 to MS Office 14. Is this the Record source SQL you are referring to?

    [CODE]SELECT [CR_No]+([Sub_No]*0.01) AS CR_Numbers1, IIf([Sub_No]=0,Format([CR_No]," #"),Format([Sub_No]*0.01," " & " .00")AS CR_Numbers, [Level] & Chr(13) & Chr(10) & [Soft Level] AS Levels, [Change Request].Change_Type, [HB_Version] & Chr(13) & Chr(10) & [Approx_Page] AS [HB Vers], [Change Request].Date_ID, [Unit] & Chr(13) & Chr(10) & [Section] AS UNITS, [MTOE_Para] & Chr(13) & Chr(10) & [Bumper_Number] AS [MTOE Paras], [Requestor] & Chr(13) & Chr(10) & [Sponsor] AS People, [Change Request].[Change Requested], [Change Request].Rationale, [Change Request].Final_Vote, [Change Request].NOTES, [Change Request].Action_Items, [Change Request].Attachment, [Change Request].NIE, [Change Request].Action_Complete
    FROM [Change Request]
    WHERE ((([Change Request].[Change Requested])<>"Do not delete") AND (([Change Request].Action_Complete)=True));



    The format not be used correctly is?: , IIf([Sub_No]=0,Format([CR_No]," #"),Format([Sub_No]*0.01," " & " .00")

  2. #17
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,915
    On second look, the Format functions do work. I just tested in the VBA immediate window. I don't know why fails in query.

    The report shows a lot of "No such field in field list." errors.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #18
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    IIf(Sub_No=0 AND IsNull(DLookup("Unit", "tablename", "Sub_No=0 AND Unit='" & Unit & "'")), "", Unit) seems to work to put it in every field.

    I DL'd the file from my earlier post. I was missing the field Units in the Closed form. I put this in a column to correct it. Units: [Unit] & Chr(13) & Chr(10) & [Section] If you DL'd the file just after I posted it, I had to change it as I forgot the CR_Numbers field with the format.

  4. #19
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,915
    The CR_Numbers field is in the query. I added the Units field and now report runs.

    I had to remove the Runtime library reference.

    What exactly should I be looking at for this issue?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #20
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    What I was trying to do is have a field display on where CR_No+(Sub_No)*.01= ###.00 and if CR_No+(Sub_No)*.01<> ###.00 and the field is = to the same field oin .00 then do not display, else display. ### is sort of the wildcard for the CR_No as the CR does matter a little, because there will be the possibility of multiple .00 in the table or query.

  6. #21
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    June7,
    You code does work, but it takes a long time to compute. Especially on the Levels code. It works when you put it in a sperate query and then use that query in the report. It does not work if you try to use the code inside the report (Control Source) SELECT.......

  7. #22
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,915
    Glad you got it working. I was just about to revisit this (been preoccupied with home reno).

    Unfortunately, domain aggregates can be slow in queries or textboxes.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 12-21-2011, 02:11 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