Search results

  1. S

    replacimg Me. referring to a combo

    Hi all, Ive written some code in a forms module that is repeated alot. i want to move this code to a module and call it so i have to replace the Me. with a full reference but i cant get it right, when i replace with what i think it should be it keeps saying object doesnt support this method...
  2. S

    Dlookup

    it does thank you. as a side ive been struggling with multiple criteria for a while, setting it out like that is a good way of doing it. thank you
  3. S

    Dlookup

    Hi all, im pretty sure ive got the quotes in the wrong place somewhere but its driving me round the bend. DLookup("[Explanation]", "[Hours]", "[AlphaName] = '" & AlphaName & "'" And "[Week No] =" & WeekNo And "[ID] =" & IDMin) AlphaName is a string both WeekNo and ID are integers...
  4. S

    filling Combobox with SQL Data

    Ive just found my own issue i didnt realise you had to set the .RowSourceType = "table/Query". inexperience is all but thanks
  5. S

    filling Combobox with SQL Data

    Ive solved through via a different method i.e. looping down a table with dlookup, not the most efficient way of doing it but there you go. if anyone does work out to do this i will monitor here and would be grateful for a response. JHB- the problem i was having is that when it was ran the...
  6. S

    filling Combobox with SQL Data

    Dont worry about that, the reason its done like that is becuase during an earlier stage a tempory Hours table is created that is unique to that person,this table is later deleted, it therefore makes sense to include that persons name in the table. anyway is it possible to modify whats been...
  7. S

    filling Combobox with SQL Data

    Hi all, hopefully this is quite easy for someone in the know, I have a select statement (AlphaName and StaffName are variables) in a module that woks fine, its been tested with a basic insert. what i want to do is get this result into a combo box without creating another table? any help is...
  8. S

    SQL in VBA

    Thank you very much, thats got it!!
  9. S

    SQL in VBA

    Hi all, the below SQL i basically tring move a record from one table to another, the table a copies of one another and the AlphaName variable is a string. I keep getting the incomplete query error, somethings missing but i havent the feintest what. thanks for any help. strSQL = "INSERT...
  10. S

    DLookup with multiple criteria

    NamLiam, certainly thanks for your advice and SQL is something i am starting to progress with however its intricacies still escape me. at present i am trying to stay as familiar as i can with functions that are atleast "similar" to excel. I will without doubt work towards replacing dlookups...
  11. S

    DLookup with multiple criteria

    thanks NamLiam thats got it and any speeched what so ever are actually welcomed as I am completely new to Access, im more of an excel fan! thanks for your help
  12. S

    DLookup with multiple criteria

    Hi all, firstly thanks for any help. i have the follwing Dlookup where tbh im just going wrong with quotes but i cant seem wo get it right. If DLookup("[ID]", "Archive", "[JDE:] =" & Staff And "[Week Ending:] =#" & Week & "#") Then if i split the Dlookup into 2 lookups it works fine...
  13. S

    SQL Expression

    FYI its only 2 required at that point in time, obviously the next week 3 will be required and the hope is that this system will allow the admin to know whos missing so they can chase them up. thanks
  14. S

    SQL Expression

    Ive uploaded a sample. you will see that there are 2 members of staff with there unique JDE. in the Archive there is has been submissions from one person on the 04/07. however if you look the Week ending table 2 are required from each person, so i would like to see the result below JDE, Week...
  15. S

    SQL Expression

    Hi, many thanks for the reply however my explanation was insufficent it would appear. my approach has to change slightly as the above simply wouldnt work. my new approach has to include a thrid table named staff. this is a list of all JDe numbers for staff (JDE is our staff ID) so my plan is to...
  16. S

    SQL Expression

    Hi, firstly thanks for any help. I have the below expression but ive done it backwards. SELECT [Week Ending].[Week Ending:], Archive.[Week Ending:] FROM [Week Ending] RIGHT JOIN Archive ON [Week Ending].[Week Ending:] = Archive.[Week Ending:] WHERE (((Archive.[Week Ending:]) Is Null)); a...
  17. S

    subscript out of range if i run twice

    Thanks for that, I still dont understand why it would work the first time but o well. I have made your changes and now im getting a whole new error xlApp.Workbooks("JDE1.xlsx").Sheets("TempHours").Range(Cells(2, 18), Cells(Cells(Rows.Count, 1).End(xlUp).Row, 18)).Value = Batch the above...
  18. S

    subscript out of range if i run twice

    its the same workbook so do i need multiple references?
  19. S

    subscript out of range if i run twice

    Good Call on that one but unfortunalty not, ive moved the setxlapp= nothing to the end of the sub and makes no difference what so ever, same problem the second time i run the script
  20. S

    subscript out of range if i run twice

    Hi all, the below code exports a table (via a function) to a spreadsheet and saves it in a defined location. the code then opens the file does some work with it then moves it(left the move bit out as it works fine) so when i run the code it works absolutle fine, table is exported, work is...
Back
Top Bottom