Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Continued question regarding script, previously answered by fyed

Posted on 2011-09-15
10
Medium Priority
?
293 Views
Last Modified: 2012-05-12
I’ve been working on this project so long now, I really feel like giving up.  Now I am told I need more than one ProvID per report, so I decided to create a Reference#, hopefully to link to use the ProvID number.  

I need to modify the existing script to make this happen.  Can anyone help?   I have also attached a copy of the most current database.
Test-EFT-08-24-11--4.accdb
0
Comment
Question by:Delores_C
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36545078
<Now I am told I need more than one ProvID per report,>
You have not really defined the issue here... or what your ultimate goal is here.

When referencing a previous question, please post the link to that question.

Finally, you posted no details on how to see this "issue"
0
 
LVL 40

Expert Comment

by:als315
ID: 36555593
Agree with Jeff, we can only suppose expected result.
Test this sample. I've supposed you like to have separate report for each Reference#.
Please, be careful with file name, where DraftDate is used. This date can be different for same Reference#. In this case you will have many files for one reference#. Test-EFT-08-24-11--5.accdb
0
 

Author Comment

by:Delores_C
ID: 36570106
The example works for producing by reference#, but it is now generating a blank pdf file, which was an issue I was dealing with earlier.
0
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36570565
FWIW...

Both DBs (as posted) produced PDFs just fine for me...


If you are using acc2007 try re-installing the PDF add-in...?
Plan-92-1001-07.08.2011.pdf
Plan-92-Provider-1-07.08.2011.pdf
0
 

Author Comment

by:Delores_C
ID: 36574527
The file works fine.  However, I need to change the data type for the Reference# to a Text field, because I need this name to display as part of the pdf file name.

I changed it in the table to text, but I am getting an error in the script.

Any help is appreciated.  Thanks in advance
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36575216
OK
I'm confused...?

First you stated:
<The example works for producing by reference#, but it is now generating a blank pdf file,>
I thought this was the issue?
Is this resolved?
Yes or No..?

If the file is blank, then why do you now state:
<The file works fine. >
How is the file fine if it is blank?

<However, I need to change the data type for the Reference# to a Text field>
Why?, you can insert a number into a file name as simply as you can text.
Besides, ...
<I need to change the data type for the Reference# >
I don't see a "Reference#" in your code anywhere... so I am confused as to where/how you are trying to do this...

...and you never stated what this mysterious error is...

Finally you never posted the link to the previous question as I requested...
    ("When referencing a previous question, please post the link to that question.")

So again, this is all very confusing


Can you post the database as it stand now?
You know the drill:

Sample database notes:
1. Back up your database(s).
2. Combine the front and back ends into one database file.
3. Remove any startup options, unless they are relevant to the issue.
4. Remove any records unless they are relevant to the issue.
5. Delete any objects that do not relate directly to the issue.
6. Remove any references to any "linked" files (files outside of the database, Images, OLE Files, ...etc)
7. Remove any references to any third party Active-x Controls (unless they are relevant to the issue)
8. Remove, obfuscate, encrypt, or otherwise disguise, any sensitive data.
9. Compile the code. (From the VBA code window, click: Debug-->Compile)
10. Run the compact/Repair utility.
11. Remove any Passwords and/or security.
12. If a form is involved in the issue, set the Modal and Popup properties to: No
    (Again, unless these properties are associated with the issue)
13. Post the explicit steps to replicate the issue.
14. Test the database before posting.

In other words, ...post a database that we can easily open and immediately see and/or troubleshoot the issue.
And if applicable, also include a clear graphical representation of the *Exact* results you are expecting, based on the sample data.



JeffCoachman




0
 

Author Comment

by:Delores_C
ID: 36575733
I am not sure what cause it to produce a blank file, but it is working fine now.

Also, I was initially told to group by Vendor#, which I did.  

Later I was told I need to have a group linked to a Reference# since there is more than one vendor connected to a location, so I this was done!

Now I am required to have the ReferenceName in the title of the pdf file when it is saved, whereas I created the Reference# as a number, which is now causing the error message I am getting when I changed the Reference# to a text file.  

I am currently trying to convert the Reference# to a text file, so I can have it saved with the name in the pdf file.

The file is attached.  

Also, I tried to delete your lookup box, and it give me errors also.  I have over 400 Reference numbers, which would not make it feasible to have a lookup box.  
Test-EFT-08-24-11--5-New.accdb
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36576266
Still no link to the previous question....eh...?

"I was initially told to group by Vendor#, which I did."
"Later I was told I need to have a group linked to a Reference#"
For what?, Why.


It is still not clear what the heart of the issue is here...

This is why I always ask that you:
13. Post the explicit steps to replicate the issue.
...and:
post a database that we can easily open and immediately see and/or troubleshoot the issue.
And if applicable, also include a clear graphical representation of the *Exact* results you are expecting, based on the sample data.

JeffCoachman






0
 
LVL 40

Accepted Solution

by:
als315 earned 2000 total points
ID: 36578458
1. When you are changing field type from number to text, you should also change filter form
StrFilter = "[Reference#] = " & rst![Reference]
to
StrFilter = "[Reference#] = '" & rst![Reference] & "'"
2. If you are changing field name in table, you should also change it anywhere: in code, in forms, in queries and in reports
3. You can delete combobox, if you don't need it - comment this if in form's code:
If IsNull(Me.Reference) = False Then
    strSQL = strSQL & "HAVING (((tblProviderAccount.[Reference]) = Clng(" & Me.Reference & "))) "
End If

Test-EFT-08-24-11--5-New.accdb
0
 

Author Closing Comment

by:Delores_C
ID: 36579779
The information and solution provided was excellent.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question