By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,449 Members | 972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,449 IT Pros & Developers. It's quick & easy.

changing code to get data from a yes/no field instead of form & SendMessage help

P: 8
Hello,

I'm trying to incorporate some code that was used in an old database (access 2003 but everything works in 2007) by someone who no longer works with me that utilizes sendkeys to send employee (agent) exceptions into their schedule which is in a different application. The old database works fine as is however I'm making a database for training and trying to use the code with mine and just started learning VBA and could use some assistance.

The code below is what I'm trying to fix and the part in red is what it use to be and the code immediately below that in blue is my failed attempt to fix it. I should note that the original code was meant to process one Agent_ID and one exception at a time whereas I'm trying to process Multiple Agent_ID's based off of two yes/no fields for one exception. Edit: guess color tags don't work so I'm underlining as well.

The error I'm currently receiving is run-time error 2046, the command or action 'Copy' isn't available now.

If anyone feels generous I'm wanting to eventually convert this from sendkeys to SendMessage to kind of future proof it and make it more reliable.


Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdEnterTRNG_Click()
  2.    Dim db As DAO.Database
  3.     Dim rs As DAO.Recordset
  4.     Dim strSQL As String
  5.     Dim intStartMinute As Integer
  6.     Dim intLength As Integer
  7.     Dim intLunchLength As Integer
  8.     Dim intException As Integer
  9.     Dim intError As Integer
  10.     Dim strCopy As String
  11.     Dim strWholeSchedule As String
  12.     Dim blManual As Boolean
  13.  
  14.     'Me.txtCopy = Null
  15.  
  16.     'Grabs Agent_ID
  17.     '[COLOR="Red"]Me.ACDID.SetFocus[/COLOR] ' Original Code used
  18.  
  19.     'My new Code to fix
  20.     [COLOR="BLUE"]strSQL = "Select [tblCE_AddTemp].[Agent_ID] " & _
  21.     "From [tblCE_AddTemp] " & _
  22.     "Where (([tblCE_AddTemp.LeaveBlank] = 0 And [tblCE_AddTemp.Missed] = 0))"
  23.  
  24.      Set db = CurrentDb()
  25.      Set rs = db.OpenRecordset(strSQL)[/COLOR]
  26.  
  27.  
  28.     DoCmd.RunCommand acCmdCopy
  29.  
  30.     'Finds Agent_ID in IEX
  31.     SendKeys ("%{TAB 1}"), True
  32.     SendKeys ("+{F4 1}"), True
  33.     SendKeys ("%{N 1}"), True
  34.     SendKeys ("{UP 3}"), True
  35.     SendKeys ("{TAB 1}"), True
  36.     SendKeys ("+{END 1}"), True
  37.     SendKeys ("^{V 1}"), True
  38.     SendKeys ("{ENTER 1}"), True
  39.     SendKeys ("{TAB 6}"), True
  40.     SendKeys ("{ENTER 1}"), True
  41.  
  42.     'Copies schedule from IEX
  43.     SendKeys ("%{E 1}"), True
  44.     SendKeys ("{DOWN 5}"), True
  45.     SendKeys ("{ENTER 1}"), True
  46.  
  47.     'Returns to Access
  48.     SendKeys ("%{TAB 1}"), True
  49.  
  50.     strWholeSchedule = Clipboard2Text()
  51.  
  52.     'Finds exception to key in IEX
  53.     'strSQL = "SELECT tbl_All_Code_Types.Qualifier, tbl_All_Code_Types.Absense_Type " & _
  54.              '"FROM tbl_All_Code_Types " & _
  55.             ' "WHERE (((tbl_All_Code_Types.Absense_Type)=" & Chr(34) & Me.Exception_Code & Chr(34) & '"));"
  56.    ' Set db = CurrentDb
  57.     'Set rs = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)
  58.    ' If rs.RecordCount = 1 Then
  59.         intException = Val(cboTTVTRNG.Value)
  60.    ' Else
  61.         'strError = "Exception not in avialble list"
  62.         'MsgBox "Please Manualy Key This. (" & strError & ")"
  63.         'rs.Close: db.Close
  64.         'Set rs = Nothing: Set db = Nothing
  65.         'Sleep (1)
  66.         'Exit Sub
  67.     'End If
  68.  
  69.     rs.Close: db.Close
  70.     Set rs = Nothing: Set db = Nothing
  71.  
  72.     'Creates the exception to be pasted into IEX
  73.     intStartMinute = DateDiff("n", #12:00:00 AM#, Me.txtTTVTRNGStart.Value)
  74.     intLength = DateDiff("n", Me.txtTTVTRNGStart.Value, Me.txtTTVTRNGEnd.Value)
  75.     strCopy = intStartMinute & "|" & intLength & "|" & intException
  76.  
  77.     'Verifies if the new exception will fit in the current schedule
  78.     varschedule = Split(strWholeSchedule, "|")
  79.  
  80.     x = Null
  81.     x = Split(FindLunch(strWholeSchedule), ",")
  82.     intLunchLength = Val(x(2))
  83.     y = Null
  84.     y = Split(strWholeSchedule, "|")
  85.  
  86.     'Can't remember what this one does
  87.     If y(1) = 0 Then
  88.         blManual = True
  89.         strError = "ERROR 2"
  90.     End If
  91.  
  92.     'Checks to make sure there is a lunch in the schedule
  93.     'Braced Out for testing 11/11/2008
  94. '    If x(0) = 0 And x(1) = 0 And x(2) = 0 Then
  95. '       blManual = True
  96. '       intError = 3
  97. '   End If
  98.  
  99. '    If blManual = True Then
  100. '       MsgBox "Please Manualy Key This. e(" & intError & ")"
  101. '       Sleep (1)
  102. '       ToggleNumLock (True)
  103. '       Sleep (1)
  104. '       Exit Sub
  105. '   End If
  106.  
  107.     If intLength = varschedule(1) And varschedule(1) >= 480 Then
  108.         Debug.Print
  109.         'Builds exception before lunch
  110.         strCopy = Val(varschedule(0)) & "|" & Val(varschedule(1)) & "|" & intException & "," & Val(varschedule(0)) & "," & Val(x(1)) - Val(varschedule(0)) & ","
  111.         'Builds Lunch
  112.         strCopy = strCopy & Val(x(0)) & "," & Val(x(1)) & "," & Val(x(2)) & ","
  113.         'Builds exception after lunch
  114.         strCopy = strCopy & intException & "," & Val(x(1)) + Val(x(2)) & "," & _
  115.                     (Val(varschedule(1)) - Val(x(2))) - (Val(x(1)) - Val(varschedule(0)))
  116.         'Tacks on the junk at the end of the schedule
  117.         strCopy = strCopy & "|-1|0"
  118.  
  119.         Me.txtTTVTRNGStart.Value = DateAdd("n", Val(varschedule(0)), #12:00:00 AM#)
  120.         Me.txtTTVTRNGEnd.Value = DateAdd("n", Val(varschedule(1)), Me.txtTTVTRNGStart.Value)
  121.         Me.txtTRNGDuration = DateDiff("n", Me.txtTTVTRNGStart.Value, Me.txtTTVTRNGEnd.Value)
  122.     Else
  123.         blManual = False
  124.         If intStartMinute < Val(varschedule(0)) Or _
  125.            intStartMinute + intLength > Val(varschedule(0)) + Val(varschedule(1)) Then
  126.             blManual = True
  127.             strError = "OUTSIDE SHIFT"
  128.         End If
  129.  
  130. '        If Val(varschedule(1)) > 600 + intLunchLength And intStartMinute + intLength > Val(varschedule(0)) + intLunchLength + 480 Then
  131. '            blManual = True
  132. '            strError = "SHIFT GREATER THAN 10HOURS"
  133. '        End If
  134.  
  135. '        If Val(varschedule(1)) < 480 Then
  136. '            blManual = True
  137. '            strError = "SHIFT LESS THAN 8 HOURS"
  138. '        End If
  139.  
  140.         If blManual = True Then
  141.             MsgBox "Please Manualy Key This. (" & strError & ")"
  142.             'Sleep (1)
  143.             Exit Sub
  144.         End If
  145.     End If
  146.  
  147.     'Checks to see if there is any overlaps - This part doesn't work completely yet
  148.     'Call DisectSchedule(strWholeSchedule)
  149.  
  150.  
  151.     'Collects the exception to paste into IEX
  152.     Call ClearClipboard
  153.     Text2Clipboard (strCopy)
  154.  
  155.     'Goes back to IEX and pastes info
  156.     SendKeys ("%{TAB 1}"), True
  157.     SendKeys ("%{E 1}"), True
  158.     SendKeys ("{DOWN 3}"), True
  159.     SendKeys ("{ENTER 1}"), True
  160.  
  161.     '-----------------------
  162.     'Sleep (5)
  163.     'SendKeys ("%{E 1}"), True
  164.     'SendKeys ("{DOWN}"), True
  165.     'SendKeys ("{ENTER 1}"), True
  166.     'Sleep (3)
  167.     'SendKeys ("%{E 1}"), True
  168.     'SendKeys ("{DOWN 3}"), True
  169.     'SendKeys ("{ENTER 1}"), True
  170.     '-----------------------
  171.  
  172.     'Turns NumLock On
  173.     'ToggleNumLock (True)
  174.  
  175.  
  176. End Sub
I also tried replacing the DoCmd.RunCommand acCmdCopy at the top of my code to DoCmd.RunCommand acCmdSelectRecord and it too errors out and stops where it's in my other application with the search window open correctly set to search Agent_ID but it's pasting "DoCmd.RunCommand acCmdSelectRecord" as the Agent_ID to pull up. I'm thinking I need major help as I don't know which to use if either of the two and from the Select Record it seems like I'll need to step through each Agent_ID and exception one at a time which I'll be happy to give it a shot but need help past this part first.

Thanks in advance!
Apr 21 '10 #1
Share this Question
Share on Google+
6 Replies


topher23
Expert 100+
P: 234
Give this a try:

Expand|Select|Wrap|Line Numbers
  1.     'My new Code to fix
  2.     strSQL = "Select [tblCE_AddTemp].[Agent_ID] " & _
  3.     "From [tblCE_AddTemp] " & _
  4.     "Where (([tblCE_AddTemp.LeaveBlank] = 0 And [tblCE_AddTemp.Missed] = 0))"
  5.  
  6.      Set db = CurrentDb()
  7.      Set rs = db.OpenRecordset(strSQL)
  8.  
  9.     Text2Clipboard (rs!Agent_ID)
  10.  
  11.     'Finds Agent_ID in IEX
  12.     SendKeys ("%{TAB 1}"), True
  13.     SendKeys ("+{F4 1}"), True
  14.     SendKeys ("%{N 1}"), True
  15.     SendKeys ("{UP 3}"), True
  16.     SendKeys ("{TAB 1}"), True
  17.     SendKeys ("+{END 1}"), True
  18.     SendKeys ("^{V 1}"), True
  19.     SendKeys ("{ENTER 1}"), True
  20.     SendKeys ("{TAB 6}"), True
  21.     SendKeys ("{ENTER 1}"), True
  22.  
The only change is that DoCmd.RunCommand acCmdCopy is being replaced by the Text2Clipboard function. The acCmdCopy command copies from the current form field that you are on, so that won't work where you've got the data you need in a recordset. Instead, use that function to push the text in the record to the clipboard.

That ought to work. If it doesn't, let us know.
Apr 21 '10 #2

topher23
Expert 100+
P: 234
I just caught the part about doing this with multiple Agent ID's. I'd have to propose doing a loop around the whole section doing the sendkeys stuff and all of the processing that goes with that, sort of like the following:

Expand|Select|Wrap|Line Numbers
  1.     'My new Code to fix
  2.     strSQL = "Select [tblCE_AddTemp].[Agent_ID] " & _
  3.     "From [tblCE_AddTemp] " & _
  4.     "Where (([tblCE_AddTemp.LeaveBlank] = 0 And [tblCE_AddTemp.Missed] = 0))"
  5.  
  6.      Set db = CurrentDb()
  7.      Set rs = db.OpenRecordset(strSQL)
  8.  
  9.     If Not rs.RecordCount = 0 Then
  10.         Do Until rs.EOF
  11.  
  12.          Text2Clipboard (rs!Agent_ID)
  13.  
  14.  
  15.          'All the rest of the subroutine body
  16.  
  17.  
  18.          rs.MoveNext
  19.         Loop
  20.     End If
  21.  End Sub
  22.  
Apr 21 '10 #3

P: 8
I was so close yet so far away! Thank You! I've been working on this for 5 hours today!

It seems like I will need to find a way to loop through each record in the table that hasn't been marked as missed or leaveblank as this processes only one agent but at least that's working :)

Also it's not copying the exception however I suspect that's on my end as well. Thanks so much. I'm going to try and fix the exception portion first then attempt the loop (think that's what I'd use for this situation) with each agent.

Thanks Topher just seen your update and that should be enough to get me going. I do enjoy trying to figure this out but when I've put in more than 3 hours on something is when I do a call for help as it's almost always something I'm overlooking or just not experienced enough to catch.
Apr 21 '10 #4

topher23
Expert 100+
P: 234
As a bit of an aside, I have a similar setup where I work, where we originally used a lot of SendKeys to push data from our local database to the corporate SCM database. As you may know, SendKeys can be very finicky in this type of situation.

In order to stabilize the process, I created a form with an Internet Explorer ActiveX browser control on it, used the browser control to navigate to the page I needed, then accessed the actual web form controls through the browser, allowing me to set them directly. like so:
Expand|Select|Wrap|Line Numbers
  1.         'log in to SCM with the password "H8ER"
  2.         Me.ieBrowser.Document.login.pwd.Value = "H8ER"
  3.         'the control is called ieBrowser, Document references the active HTML page,
  4.         'the frame on the page is called login and the field is pwd.  
  5.  
This ended up being so much better than tabbing across a page and throwing out text, hoping it went into the right place.
Apr 21 '10 #5

P: 8
Topher, Thanks I will give that a try once I have a working process with this. Out of curiosity have you ever tried SendMessage versus the method you described? As once I get this working with my db I'm definitely changing it and updating it.

I haven't stopped working on this since this morning but taking a break from it tonight. I've updated some of the code so I'll post below.

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdEnterTRNG_Click()
  2.    Dim db As DAO.Database
  3.     Dim rs As DAO.Recordset
  4.     Dim strSQL As String
  5.     Dim intStartMinute As Integer
  6.     Dim intLength As Integer
  7.     Dim intLunchLength As Integer
  8.     Dim intException As Integer
  9.     Dim intError As Integer
  10.     Dim strCopy As String
  11.     Dim strWholeSchedule As String
  12.     Dim blManual As Boolean
  13.  
  14.     'Me.txtCopy = Null
  15.  
  16.     'Grabs Agent_ID
  17.     'Me.ACDID.SetFocus
  18.      strSQL = "Select [tblCE_AddTemp].[Agent_ID] " & _
  19.      "From [tblCE_AddTemp] " & _
  20.      "Where (([tblCE_AddTemp.LeaveBlank] = 0 And [tblCE_AddTemp.Missed] = 0))"
  21.  
  22.       Set db = CurrentDb()
  23.       Set rs = db.OpenRecordset(strSQL)
  24.  
  25.      Text2Clipboard (rs!Agent_ID)
  26.  
  27.      'Finds Agent_ID in IEX
  28.      SendKeys ("%{TAB 1}"), True
  29.      SendKeys ("+{F4 1}"), True
  30.      SendKeys ("%{N 1}"), True
  31.      SendKeys ("{UP 3}"), True
  32.      SendKeys ("{TAB 1}"), True
  33.      SendKeys ("+{END 1}"), True
  34.      SendKeys ("^{V 1}"), True
  35.      SendKeys ("{ENTER 1}"), True
  36.      SendKeys ("{TAB 6}"), True
  37.      SendKeys ("{ENTER 1}"), True
  38.  
  39.     'Copies schedule from IEX
  40.     SendKeys ("%{E 1}"), True
  41.     SendKeys ("{DOWN 5}"), True
  42.     SendKeys ("{ENTER 1}"), True
  43.  
  44.     'Returns to Access
  45.     SendKeys ("%{TAB 1}"), True
  46.  
  47.     strWholeSchedule = Clipboard2Text()
  48.  
  49.     rs.Close: db.Close
  50.     Set rs = Nothing: Set db = Nothing
  51.  
  52.  
  53.  
  54.  
  55.     'Finds exception to key in IEX
  56.    Set db = CurrentDb
  57.    Set rs = CurrentDb.OpenRecordset(strSQL)
  58.    If Not (rs.BOF And rs.EOF) Then
  59.    'If rs.RecordCount = 0 Then
  60.         intException = Val(cboTTVTRNG.Value)
  61.    Else
  62.         strError = "Exception not in avialble list"
  63.         MsgBox "Please Manualy Key This. (" & strError & ")"
  64.         rs.Close: db.Close
  65.         Set rs = Nothing: Set db = Nothing
  66.         Sleep (1)
  67.         Exit Sub
  68.    End If
  69.  
  70.     rs.Close: db.Close
  71.     Set rs = Nothing: Set db = Nothing
  72.  
  73.  
  74.  
  75.  
  76.     'Creates the exception to be pasted into IEX
  77.     intStartMinute = DateDiff("n", #12:00:00 AM#, Me.txtTTVTRNGStart)
  78.     intLength = DateDiff("n", Me.txtTTVTRNGStart, Me.txtTTVTRNGEnd)
  79.     strCopy = intStartMinute & "|" & intLength & "|" & intException
  80.  
  81.     'Verifies if the new exception will fit in the current schedule
  82.     varschedule = Split(strWholeSchedule, "|")
  83.  
  84.     x = Null
  85.     x = Split(FindLunch(strWholeSchedule), ",")
  86.     intLunchLength = Val(x(2))
  87.     y = Null
  88.     y = Split(strWholeSchedule, "|")
  89.  
  90.     'Can't remember what this one does
  91.     If y(1) = 0 Then
  92.         blManual = True
  93.         strError = "ERROR 2"
  94.     End If
  95.  
  96.     'Checks to make sure there is a lunch in the schedule
  97.     'Braced Out for testing 11/11/2008
  98. '    If x(0) = 0 And x(1) = 0 And x(2) = 0 Then
  99. '       blManual = True
  100. '       intError = 3
  101. '   End If
  102.  
  103. '    If blManual = True Then
  104. '       MsgBox "Please Manualy Key This. e(" & intError & ")"
  105. '       Sleep (1)
  106. '       ToggleNumLock (True)
  107. '       Sleep (1)
  108. '       Exit Sub
  109. '   End If
  110.  
  111.     If intLength = varschedule(1) And varschedule(1) >= 480 Then
  112.         Debug.Print
  113.         'Builds exception before lunch
  114.         strCopy = Val(varschedule(0)) & "|" & Val(varschedule(1)) & "|" & intException & "," & Val(varschedule(0)) & "," & Val(x(1)) - Val(varschedule(0)) & ","
  115.         'Builds Lunch
  116.         strCopy = strCopy & Val(x(0)) & "," & Val(x(1)) & "," & Val(x(2)) & ","
  117.         'Builds exception after lunch
  118.         strCopy = strCopy & intException & "," & Val(x(1)) + Val(x(2)) & "," & _
  119.                     (Val(varschedule(1)) - Val(x(2))) - (Val(x(1)) - Val(varschedule(0)))
  120.         'Tacks on the junk at the end of the schedule
  121.         strCopy = strCopy & "|-1|0"
  122.  
  123.         Me.txtTTVTRNGStart = DateAdd("n", Val(varschedule(0)), #12:00:00 AM#)
  124.         Me.txtTTVTRNGEnd = DateAdd("n", Val(varschedule(1)), Me.txtTTVTRNGStart)
  125.         Me.txtTRNGDuration = DateDiff("n", Me.txtTTVTRNGStart, Me.txtTTVTRNGEnd)
  126.     Else
  127.         blManual = False
  128.         If intStartMinute < Val(varschedule(0)) Or _
  129.            intStartMinute + intLength > Val(varschedule(0)) + Val(varschedule(1)) Then
  130.             blManual = True
  131.             strError = "OUTSIDE SHIFT"
  132.         End If
  133.  
  134. '        If Val(varschedule(1)) > 600 + intLunchLength And intStartMinute + intLength > Val(varschedule(0)) + intLunchLength + 480 Then
  135. '            blManual = True
  136. '            strError = "SHIFT GREATER THAN 10HOURS"
  137. '        End If
  138.  
  139. '        If Val(varschedule(1)) < 480 Then
  140. '            blManual = True
  141. '            strError = "SHIFT LESS THAN 8 HOURS"
  142. '        End If
  143.  
  144.         If blManual = True Then
  145.             MsgBox "Please Manualy Key This. (" & strError & ")"
  146.             'Call Sleep(1)
  147.             Exit Sub
  148.         End If
  149.     End If
  150.  
  151.     'Checks to see if there is any overlaps - This part doesn't work completely yet
  152.     'Call DisectSchedule(strWholeSchedule)
  153.  
  154.  
  155.     'Collects the exception to paste into IEX
  156.     Call ClearClipboard
  157.     Text2Clipboard (strCopy)
  158.  
  159.     'Goes back to IEX and pastes info
  160.     SendKeys ("%{TAB 1}"), True
  161.     SendKeys ("%{E 1}"), True
  162.     SendKeys ("{DOWN 3}"), True
  163.     SendKeys ("{ENTER 1}"), True
  164.  
  165.     '-----------------------
  166.     'Sleep (5)
  167.     'SendKeys ("%{E 1}"), True
  168.     'SendKeys ("{DOWN}"), True
  169.     'SendKeys ("{ENTER 1}"), True
  170.     'Sleep (3)
  171.     'SendKeys ("%{E 1}"), True
  172.     'SendKeys ("{DOWN 3}"), True
  173.     'SendKeys ("{ENTER 1}"), True
  174.     '-----------------------
  175.  
  176.     'Turns NumLock On
  177.     'ToggleNumLock (True)
  178.  
  179.  
  180. End Sub
The problem I'm still having (as I haven't attempted to do multiple Agents yet) is to get it to actually paste the code into my other program IEX. Everything looks correct when the code executes and selects the correct agent however no exception is getting pasted. I have a hunch where my problem is (not too far down from top) but have no clue how to go about solving this but then again I've been working on this almost 11 hours.


Expand|Select|Wrap|Line Numbers
  1. 'Finds exception to key in IEX
  2.     strSQL = "SELECT tbl_All_Code_Types.Qualifier, tbl_All_Code_Types.Absense_Type " & _
  3.              "FROM tbl_All_Code_Types " & _
  4.              "WHERE (((tbl_All_Code_Types.Absense_Type)=" & Chr(34) & Me.Exception_Code & Chr(34) & "));"
  5.     Set db = CurrentDb
  6.     Set rs = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)
  7.     If rs.RecordCount = 1 Then
  8.         intException = Val(rs!qualifier)
  9.     Else
  10.         strError = "Exception not in avialble list"
  11.         MsgBox "Please Manualy Key This. (" & strError & ")"
  12.         rs.Close: db.Close
  13.         Set rs = Nothing: Set db = Nothing
  14.  
The small section of code above is the original and below is mind. The original code is doing a recordcount which was fine for the old database that processed one exception for one agent at a time however I am unsure how to correctly switch out that code as I'm thinking that's the part keeping the process from working correctly.


Expand|Select|Wrap|Line Numbers
  1. 'Finds exception to key in IEX
  2.    Set db = CurrentDb
  3.    Set rs = CurrentDb.OpenRecordset(strSQL) 'Prob needs to be '
  4. 'changed/removed
  5.  
  6.    If Not (rs.BOF And rs.EOF) Then 
  7.    'If rs.RecordCount = 0 Then  'I just tried switching out the Record Count
  8.         intException = Val(cboTTVTRNG.Value)
  9.    Else
  10.         strError = "Exception not in avialble list"
  11.         MsgBox "Please Manualy Key This. (" & strError & ")"
  12.         rs.Close: db.Close
  13.         Set rs = Nothing: Set db = Nothing
  14.         Sleep (1)
  15.         Exit Sub
  16.    End If
  17.  
  18.     rs.Close: db.Close
  19.     Set rs = Nothing: Set db = Nothing
Apr 22 '10 #6

P: 8
@topher23
I have finally figured this out and my issue was that the exception selected on the form wasn't being picked up by vba correctly due to the table layout so I created a hidden text field on the form with a dlookup referencing which exception was selected and have it reflect the TTV code and that fixed everything.

Topher: your assistance with the looping through each record saved me a ton of time however it was getting hung up after the first agent and I eventually figured out I needed an additional
Expand|Select|Wrap|Line Numbers
  1. SendKeys ("%{TAB 1}"), True
prior to the rs.MoveNext at the end to have it switch back to Access. Pretty simple once you step back from it but it took me forever to realize that.
Alas it was a learning experience for sure!

I intend on exploring your suggestion on integrating with internet explorer once I get everything up and running as we could have used this db a long time ago so I need something working asap. Do you have any links or references that you would suggest to point me in the right direction with this? I'm also very curious as the next step of my db is to link up to an outside vendor website that we have to submit data to and I'm having a rough time finding what constants to use and finding the right ID's for the web elements (hope that's worded right). Think I'll start a new thread on that one however as I've been googling for a few days with no dice.
Apr 27 '10 #7

Post your reply

Sign in to post your reply or Sign up for a free account.