I changed it and I am still getting the same error......ugghh I can't believe how much trouble this is.....
I changed it and I am still getting the same error......ugghh I can't believe how much trouble this is.....
I am still getting the same error even when I changed it...
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.
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....
I appreciate all the help, I really do! I am just getting frustrated!
I followed all of that but I am getting "file failed to upload" error
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!
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
I've tried uploading but it keeps failing on size??? I have compacted/repaired.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 have uploaded to dropbox and renamed the database "_J" suffix
https://www.dropbox.com/s/zr1w7xnpfp...B_J.accdb?dl=0
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?
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.