Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
  1. #16
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    I changed it and I am still getting the same error......ugghh I can't believe how much trouble this is.....

  2. #17
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    I am still getting the same error even when I changed it...

  3. #18
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Perhaps you should post a copy of the database ---remove anything confidential --before posting . Only a few records are required - just enough to identify a record to report.

  4. #19
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    Ok, how do I do that because when I try to attach it to the message I keep getting an upload error.....I zipped it in a folder too....and did the compact & repair thing....

  5. #20
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    I appreciate all the help, I really do! I am just getting frustrated!

  6. #21
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

  7. #22
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    I followed all of that but I am getting "file failed to upload" error

  8. #23
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

  9. #24
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    OK I watched the video but that will not work for me because it's a report that I am trying to view/print created from data in the form....
    I uploaded my database to dropbox and here is the link

    https://www.dropbox.com/s/zxh8p4wlmq...eDB.accdb?dl=0

    If anyone can take a look and help me out I would appreciate it.

    Thank You!

  10. #25
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    OK. I looked at the database. I made a couple of changes.

    you have your table and form and possibly other things with the same name. I did not change the name of your subform.

    I renamed your form from tblCustomers to frmCustomers
    I also changed this code
    Code:
    Private Sub GenerateWorkOrder_Click()
    Dim sWhere As String
    Dim iMyID As Long
    
    'tblWorkOrder Subform   <------this is the name of your subform control
    
    iMyID = Me.[tblWorkOrder Subform]![Work Order No]  
    sWhere = "[Work Order No] = " & iMyID
    
    DoCmd.OpenReport "rptWorkOrder", acViewPreview, , sWhere
    
    End Sub
    I've tried uploading but it keeps failing on size??? I have compacted/repaired.

    I have uploaded to dropbox and renamed the database "_J" suffix
    https://www.dropbox.com/s/zr1w7xnpfp...B_J.accdb?dl=0

  11. #26
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    OMG thank you so much!! I really really appreciate the help and the time and effort y'all have taken to help me. I am sure I will be back for more questions once it's all said and done lol

    So, using the same name even with the prefix tbl or frm can cause problems is what you are saying?

  12. #27
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    No that was not your issue. But when you have a form, it's better to name it frmXXXXXX rather than tblXXXX. Your issue was related to the subform control name and referencing it in vba.
    Also, although you were using a query to identify records, you were not placing criteria on the query to restrict the value to the current record on the form.
    You should use a naming convention that doesn't allow embedded spaces in names. It will save you from several syntax related issues/errors.

    There are many good free videos on youtube. Also, by using Google/Bing you can often find issues/solutions similar to your own.

    Good luck. Happy to help.

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

Similar Threads

  1. Replies: 3
    Last Post: 04-28-2017, 09:51 AM
  2. Print single record in report and view
    By banpreet in forum Reports
    Replies: 3
    Last Post: 01-12-2017, 02:38 PM
  3. Print report on form in view
    By keiath in forum Reports
    Replies: 3
    Last Post: 11-11-2016, 12:32 PM
  4. View/Print PDF attachment in report
    By bnecrush in forum Access
    Replies: 3
    Last Post: 02-15-2016, 11:44 AM
  5. Replies: 2
    Last Post: 05-06-2012, 11:10 AM

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