Results 1 to 5 of 5
  1. #1
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480

    Using Google Form entries as Backend Database, couple small issues...

    Alright, I have a large amount of people clicking on an app I wrote some years ago. The backend database has always been in access, but due to the large volumn of people and REALLY POOR vpn connections.. I am trying to use google forms to start tracking activity. It seems to be working great, I just have a couple problems.

    First, let me show you the form here... feel free to try it out, Once the issue has been marked solved I am going to edit this thread to take the live form URL out.

    Code:
     Dim oIe As InternetExplorer  Dim User, Pass As String
      Dim strUser, strPass As String
      Dim Uname As String
      Dim ctlCurrentControl As control
      Dim strControlName As String
      Dim db As Database
      
      Set db = CurrentDb
      Uname = Environ("username")
      Set ctlCurrentControl = Screen.ActiveControl
      strControlName = ctlCurrentControl.Name
      
    Set oIe = FindIE("Google FOrm URL")
    
    
    If oIe Is Nothing Then
    Set oIe = Login("Google form url", True)
    End If
    
    
    Call SleepIE(oIe)
    
    
    
    
    
    
    oIe.Document.all.Item("entry_896438412").Value = Uname
    
    
    oIe.Document.all.Item("entry.1614432791").Value = strControlName
    
    
    oIe.Document.all.Item("entry.777398801").Value = Now
    
    
    oIe.Document.all.Item("entry.925840023").Value = db.Properties("AppTitle").Value
    
    
    oIe.Document.all.Item("submit").Click
    
    
    Call SleepIE(oIe)
    
    
    oIe.Navigate ("Google form url")
    
    
    
    
    End Sub

    Okay, the first problem I am having is on the initial load of the form I receive a crazy error that states

    Code:
    Webpage error details
    
    User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; QAM; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; InfoPath.3; Tablet PC 2.0)
    Timestamp: Fri, 31 Oct 2014 14:09:25 UTC
    
    
    
    
    Message: Object doesn't support this property or method
    Line: 167
    Char: 114
    Code: 0
    URI: https://docs.google.com/static/forms/client/js/3191719111-formviewer_prd.js

    And the second thing I have not figured out is how to capture the Application Title in access. I could just hardcode the text I want, but I plan on rolling this out to 5 or 6 different applications, so to have it dynamic would be the best solution. (Fixxed, found this "CurrentDb.Properties("AppTitle")" and it works just fine!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,923
    Not seeing a url so you have this all solved?
    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. #3
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Not all solved, I have a small group of 20 users pumping data into it now.. I really had high hopes for this thing.. but I don't know if the code is solid enough yet.... If I can get it working 100% I will create a write up on here about how to utilize google forms for a backend database.

  4. #4
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Well, This code...

    Code:
    oIe.Document.all.Item("entry_896438412").Value = UnameoIe.Document.all.Item("entry.1614432791").Value = strControlName
    oIe.Document.all.Item("entry.777398801").Value = Now
    oIe.Document.all.Item("entry.925840023").Value = db.Properties("AppTitle").Value



    Isn't going to work, the text box names/id's are not reliable enough. The only unique thing I can find on these text boxes are
    aria-label, but I don't know how to separate by them...

  5. #5
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    So, I've come to the conclusion that google forms can't be used for a backend database...I've found a way to enter data into the the form even if the ID & Name have changed...

    Code:
    oIe.Document.all.tags("input").Item(0).Value = Uname
    
    oIe.Document.all.tags("input").Item(1).Value = strControlName
    
    
    oIe.Document.all.tags("input").Item(3).Value = Date
    
    
    oIe.Document.all.tags("input").Item(2).Value = Format(Time, "hh:mm")
    
    
    oIe.Document.all.tags("input").Item(4).Value = CurrentDb.Properties("AppTitle")
    
    
    oIe.Document.all.Item("submit").Click
    However, the success rate is really low. Kind of bums me out that this could not be a solution, as google docs has a ton of different ways to distribute and sort data. I'm going to mark this thread as solved, but in all reality it's just not a viable option.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 03-19-2014, 03:04 AM
  2. Replies: 2
    Last Post: 11-19-2013, 11:44 AM
  3. Replies: 1
    Last Post: 03-07-2013, 04:59 PM
  4. Couple Design Issues
    By dpasanen in forum Forms
    Replies: 4
    Last Post: 03-29-2012, 07:47 AM
  5. Replies: 5
    Last Post: 01-18-2012, 03:46 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