Search results

  1. W

    Help to click this button with IE.document

    Can anyone help with how to click this button using IE.document?
  2. W

    Help filling in a web form from access.

    Also I'm trying to click this ckeckbox: '<input name="IsFirstTest" id="IsFirstTest" type="checkbox" value="true" data-val-required="The First test field is required." data-val="true" htmlattributes="{ id = cbkFirstTest, class = form-control }" data-group="cbTest"> I've tried using all of these...
  3. W

    Help filling in a web form from access.

    Thanks again everyone. Is there a way using this code to read the entire page source/html into a string variable? I used to use the code below but it started getting blocked by the site I was querying. Dim winReq As Object Dim HTM, Address As Variant ' Set winReq = New...
  4. W

    Help filling in a web form from access.

    Thanks. The elements didn't show up in the html, but using the tool you suggested revealed them and I have managed to enter data.
  5. W

    Help filling in a web form from access.

    You can enter postcode and if you click the grey box a list of addresses drops down. If you click the manual address a pop up appears allowing you to enter the address. I tried to post the html, but it is too long. Is there a way to simulate key presses in IE? I can manually tab through the...
  6. W

    Help filling in a web form from access.

    I can login to a website and navigate to this page. I want to fill in the form. The problem is the page source code doesn’t show the elements that I want to complete, so I can’t figure out how to enter any data. How do I go about completing the form, which includes a drop-down list for title...
  7. W

    Postcode lookup stopped working

    It means I've been using that code for years but I knew one day it would be gone forever.
  8. W

    Postcode lookup stopped working

    Bogus :(
  9. W

    Postcode lookup stopped working

    Sorry to revive this but it has stopped working again. It just gives address not found. When I first put the url into chrome it works fine and shows the addresses. After a bit it says I'm blocked. Set winReq = CreateObject("MSXML2.XMLHTTP") With winReq .Open "GET", sStr, False...
  10. W

    Check for open excel workbook and if open take control

    So how do I go about editing it and then leaving it visible on screen? The following doesn't work. Dim wb2 As Object Set wb2 = GetObject(gdrive & "LabOrderSheet.xlsx") If wb2 Is Nothing Then MsgBox "no" Else ' Do something with your workbook object MsgBox wb2.Name Set oXLSheet =...
  11. W

    Check for open excel workbook and if open take control

    Thanks all. I will put the do stuff below. It just clears the form in this instance. @cheekybuddha sorry I tried your code but it reports the file name even if the excel workbook isn't open, hence I thought it was just checking to see if it exists. If it is capable of taking control if it's...
  12. W

    Check for open excel workbook and if open take control

    when I say hit and miss I mean today. I only found that code a few hours ago. At first it worked. Then as I adapted it it stopped working. I went back to the version I found and it worked. then after a while even the original code wouldn't work at all. I noticed an Excel process in task manager...
  13. W

    Check for open excel workbook and if open take control

    Sorry and thanks. This is from within Access. I will give that a go. EDIT: that does work but what I'm trying to do is if the workbook is open then take control and if not then open it, assuming it exists.
  14. W

    Check for open excel workbook and if open take control

    I've been trying to adapt some code so I can take control of an open excel workbook. Dim WB As excel.Workbook Dim myWB As String myWB = "LabOrderSheet.xlsx" For Each WB In Workbooks MsgBox WB.Name If WB.Name = myWB Then WB.Activate MsgBox "Workbook Found!" Exit Sub...
  15. W

    Variable has a random capital ever since I typed it in wrong in a table. How to fix?

    Thanks everyone. I was going to try and post the database but there is a lot of sensitive info I was trying to remove before doing so. Anyway I renamed the field in tables. Deleted it from all forms. Found and replaced all occurrences with the code. Along with lots of compact and repair (may...
  16. W

    Variable has a random capital ever since I typed it in wrong in a table. How to fix?

    I've deleted it from all tables. I've deleted it from all forms. I've deleted it from all vba. I've compacted and repaired. I closed and reopened. When I type Surname it changes to SUrname. What could I be missing? I wish I could get on with my life but I feel like Walter White chasing a fly...
  17. W

    Variable has a random capital ever since I typed it in wrong in a table. How to fix?

    This is an odd one. I set a table up and created a form from it. I then wrote some vba code. A while later I noticed I had named a field in the database SUrname instead of Surname. I've rewritten it as Surname in table, field controls etc, but in vba code it still corrects to SUrname. I then...
  18. W

    Looping through fields in a form and obtaining the values

    Sorry to be a pain. But if using the code below how would I get it to use only 1 record which is the currently open form record? Dim LastRow As Long LastRow = oXLSheet.UsedRange.Rows.count + 1 Dim rs As ADODB.Recordset, x As Integer Set rs = New ADODB.Recordset rs.Open "LabOrders"...
  19. W

    Looping through fields in a form and obtaining the values

    Thanks. I've got that working but it's copying the entire table into excel each time. Is there a way to make it use only the current open form data or a particular ID number?
  20. W

    Looping through fields in a form and obtaining the values

    I'm using the following code to populate the columns in an excel spreadsheet with the field name from an access form. Dim count As Integer: count = 1 For Each fld In db.TableDefs!LabOrders.Fields oXLSheet.Cells(1, count).Value = fld.Name count = count + 1 Next What I also want to do is move...
Back
Top Bottom