Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Best Approach in Access
Stephen Meiring 
   
3 years ago
I have a form that we have to use due to ISO requirements.
We use Access to enter information pertaining to Nonconforming parts. We currently enter the information into an editable PDF version of the form and then re-enter the same information into Access. I want to enter the information into the database and have it automatically fill in the form. I am trying to set this up on the preexisting printable form but when I go to print it does not print the back of the form and is printing some weird page that doesn't exist.

The form then gets saved to a local drive location so we can add supporting documentation.

What would be the best approach for this through Access.
Kevin Robertson  @Reply  
          
3 years ago
Juan C Rivera  @Reply  
            
3 years ago
Fill In PDF
Fill In PDF Forms with Microsoft Access Data try this it may be inline with what your looking for.
Richard Rost  @Reply  
          
3 years ago
You could always fill out the PDF and then copy the data from the PDF into Access by switching to the window, copying the whole thing to the clipboard, and then analyzing the text. AppActivate
Stephen Meiring OP  @Reply  
   
3 years ago
Hello Juan,

I am in the process of filling out the code to have it fill in the PDF. It is opening the PDF; however, it is not tabbing to the NCMR # Spot and it is not sending the Data.

This what I have as the Code so Far

Private Sub FillInPDFBtn_Click()
    Dim X As Long
    ' Hyperlink
    FollowHyperlink "Y:/ISO WEB/Level IV/Quality/Q-220.pdf"
        
    Sleep 500 'wait for PDF to Load
    
    ' Send 1 Tab Keys
    For X = 1 To 1
        SendKeys "(TAB)", True
        Sleep 100
    Next

     ' Fill in Fields
      SendData NCMRNumber
End Sub
Richard Rost  @Reply  
          
3 years ago
For X = 1 to 1

Doesn't seem right
Stephen Meiring OP  @Reply  
   
3 years ago
I only needed to hit the tab button once. I wasn't sure how to word the code for that.
Richard Rost  @Reply  
          
3 years ago
Just get rid of the For loop completely then.
Stephen Meiring OP  @Reply  
   
3 years ago
Hello,

Getting rid of the for Loop did not work. So I had it tab 12 times to the Initiatedby field. Still nothing.

Here is the code:

Private Sub SendData(S As Variant)

    If IsNull(S) Or S = "" Then S = " "

    SendKeys S & "(TAB)", True
    Sleep 3000
    
End Sub


Private Sub FillInPDFBtn_Click()
    
     ' Hyperlink
    
        FollowHyperlink "Y:/ISO WEB/Level IV/Quality/Q-220.pdf"
        
        Sleep 10000 'wait for PDF to Load
    
    ' Send 12 Tab Keys
    
        For X = 1 To 12
  
            SendKeys "(TAB)", True
            Sleep 300
        Next
    
    ' Fill in Fields
    
        SendData InitiatedBy
        SendData NCMR#

End Sub

Kevin Robertson  @Reply  
          
3 years ago
TAB should be in curly braces {TAB}, not parentheses.
Richard Rost  @Reply  
          
3 years ago
Nice catch, Kevin.
Stephen Meiring OP  @Reply  
   
3 years ago
Hello,

The document is opening, and the cursor is in the correct field, however the data is not transferring.

Private Sub SendData(S As Variant)

    If IsNull(S) Or S = "" Then S = " "

    SendKeys S & "{TAB}", True
    Sleep 300
    
End Sub


Private Sub FillInPDFBtn_Click()
    
     ' Hyperlink
    
        FollowHyperlink "Y:/ISO WEB/Level IV/Quality/Q-220.pdf"
        
        Sleep 1000 'wait for PDF to Load
            
    ' Fill in Fields
    
        SendData NCMRNumber
        SendData "{TAB}"
        SendData "{TAB}"
        SendData NCMRType
        SendData InitiatedDate
        SendData ProductFamily

End Sub
Stephen Meiring OP  @Reply  
   
3 years ago
The name that i use after SendData "NCMRNumber", Do I use the Name i give it or the Source Name?
Alex Hedley  @Reply  
           
3 years ago
Have you named them differently?
Stephen Meiring OP  @Reply  
   
3 years ago
Yes, the names given by who created it, have spaces in them. I just removed the spaces in the name.
Stephen Meiring OP  @Reply  
   
3 years ago
I took out all the spaces in both, but when I opened the input form we use, it was no longer displaying the records in descending order, it was doing a random draw. We have to update each record pretty much daily while they are open. So the random draw won't work.
Alex Hedley  @Reply  
           
3 years ago
Not quite following.
You've changed the names in the Table/Query/Form?
Alex Hedley  @Reply  
           
3 years ago
Does your Query have a sort on it?
Stephen Meiring OP  @Reply  
   
3 years ago
We enter the information into a Form and the fields are all in a table. I don't see a query attached. I will upload photos.

In the first photo you will see the field name is N NCMR Number. The Name is NCMRNumber(took spaces out for VBA). When you open the NCMR input form, it opens on a blank form. When you hit the scroll arrows it goes to the last entered Form. When I tried taking out the spaces in field name (to match the name), the order was random.

Hope this gives a better understanding.
Stephen Meiring OP  @Reply  
   
3 years ago

Stephen Meiring OP  @Reply  
   
3 years ago

Stephen Meiring OP  @Reply  
   
3 years ago

Stephen Meiring OP  @Reply  
   
3 years ago

Kevin Yip  @Reply  
     
3 years ago
Regarding you seeing wrong sort order, do you have the correct sort order in the "Order By" property on the property sheet?  You said you took out all the spaces in the names, but your picture above shows your "Order By" property still has spaces: [NCMR Main Table].[N NCMR Number].  It needs to have the correct field name(s) to sort properly.

Regarding sending keystrokes to PDF forms, I've never done that because it's often easier to just recreate the form in Access (see picture below).  If the form is not too complex and contains mainly boxes and lines, it's easier to just recreate it with the report designer.  Then you'll only have to put in bound controls and run it like a regular report.
Kevin Yip  @Reply  
     
3 years ago

Stephen Meiring OP  @Reply  
   
3 years ago
I took out all the spaces, then the order became random. So, I put the spaces back in.
Kevin Yip  @Reply  
     
3 years ago
Remove the "Order By" value on the property sheet and try setting the sort order on the form -- right-click on the textbox that contains the field to be sorted, then select the sort settings.  Close and save the form.  Open it again in design view and check the "Order By" property again.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/22/2026 10:22:49 AM. PLT: 0s