Search results

  1. 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...
  2. 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.
  3. W

    Postcode lookup stopped working

    Bogus :(
  4. 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...
  5. 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 =...
  6. 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...
  7. 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...
  8. 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.
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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"...
  14. 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?
  15. 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...
  16. W

    Solved Problem closing excel

    Once again many thanks. I will give that code a go.
  17. W

    Solved Problem closing excel

    Thanks. I changed the ones you listed and a couple of others and it now works. I wish I knew why? Many thanks for your help.
  18. W

    Solved Problem closing excel

    Please excuse my code, but this is the */ DO STUFF /* bit. It takes values from the spreadsheet and creates a table in a word documents. I can run it with selection box called "PriceListSale" ticked or unticked which will use slightly different data. There is probably a much better way to do...
  19. W

    Solved Problem closing excel

    I have some access vba code that pulls data from and excel spreadsheet. The problem is after it runs excel is still open in the background, so I must kill it via task manager. I’ve tried a couple of ways to close excel, which I use elsewhere in code and it works fine. Does anyone know how to...
  20. W

    Application.FollowHyperlink sudden problem

    Thanks. I just checked and it is working again. I will still keep my new code in place just in case this happens again.
Back
Top Bottom