Search results

  1. M

    Solved Those Dreaded Dates Again

    Yay, I have got it to work with the following: If Nz(Me.cbxSystemDate, "") <> "" Then strWhere = strWhere & "[SystemDate] = #" & Trim(Me.cbxSystemDate) & "# AND " End If :cool:
  2. M

    Solved Those Dreaded Dates Again

    Hey All, I'm trying to filter a from using a few different combo boxes, one of them is to filter records for a date, I'm using the following code but I keep getting the error "Run Time Error 3709. The search key was not found for any record." If Nz(Me.cbxSystemDate, "") <> "" Then...
  3. M

    Cannot get VBA to put data in to a textbox after hiding

    Yay, I have it working now with the code below. Thanks again for all your help again tonight :cool: Me!subfrmDiary!txtManagerDiary = DLookup("ManagerDiary", "tbl_Net_Diary", "TheDate = " & Format(Forms!frmBackground.txtLocalSystemDate, "\#mm/dd/yyyy\#"))
  4. M

    Cannot get VBA to put data in to a textbox after hiding

    I've just checked, it is a date format issue as the DLookup works but it thinks that it is 10th of November. The working code is Forms!frmBackground!subfrmDiary!txtManagerDiary = DLookup("ManagerDiary", "tbl_Net_Diary", "TheDate = #" & Forms!frmBackground.txtLocalSystemDate & "#") however I...
  5. M

    Cannot get VBA to put data in to a textbox after hiding

    I'm pretty sure that the DLookup is working but my date is the issue, I think I remember this problem before. My date format is dd/mm/yyyy. I'm trying this but it doesn't work, please can you help Forms!frmBackground!subfrmDiary.txtManagerDiary = DLookup("ManagerDiary", "tbl_Net_Diary"...
  6. M

    Cannot get VBA to put data in to a textbox after hiding

    Hello, I have a form and a subform which has a textbox called tctManagerDiary, when I click on a button to hide the subform then click on a button to show the subform the data will not append to the textbox. The code I am trying is Me!subfrmDiary.Form.txtManagerDiary = DLookup("ManagerDiary"...
  7. M

    Using DLookup to put Value in to a Textbox

    Fabulous!! Thank you both for your help. :) I got it working with this: Forms!frmBackground!subfrmDiary!txtManagerDiary.Value = DLookup("ManagerDiary", "tbl_Net_Diary", "TheDate = #" & Forms!frmBackground.txtLocalSystemDate & "#")
  8. M

    Using DLookup to put Value in to a Textbox

    Hi Plog, Thank you for that, I have updated to the following as you said but it returns me the Run time error 438; Object doesn't support this object or method. Can you think of anything else I can try please? Forms!frmBackground.subfrmDiary.txtManagerDiary.Value = DLookup("ManagerDiary"...
  9. M

    Using DLookup to put Value in to a Textbox

    Hello, I am looking to use DLookup to put values in to textboxes using VBA, can I do something like this please: Me!subfrmDiary.txtManagerDiary.Value = DLookup("ManagerDiary", "tbl_Net_Diary", "TheDate = Forms.frmBackground.txtLocalSystemDate") I have also tried...
  10. M

    Environ("ComputerName")

    Thank you, (I'm not really sure what you meant by that) I did a wee workaround: On my Background form I created a textbox called txtComputer and On Load of that form I added the line Me.txtComputer.Value = Environ("ComputerName") from there just added the link to the textbox, so I ended up...
  11. M

    Environ("ComputerName")

    Hey All, Can Environ('ComputerName') go in to a SQL Statement? I'm looking to do: DoCmd.RunSQL "INSERT INTO tbl_Net_UserLog(UserName, Action, Computer) SELECT Forms!frmBackground!txtUserName, 'User Logged Off', Environ('ComputerName')" Thanks, Malcolm
  12. M

    Two Crosstab Queries Combined by Sum in to One Query

    Oh deer, I've spent all night looking at this and made it far to complicated, I have just done what I need with a simple query!! Thank you ;)
  13. M

    Two Crosstab Queries Combined by Sum in to One Query

    They come from the same table, records are marked PI and PC but both amounts are minuses, so I have used Abs in the field Amount to make the PI a plus then I was hoping to add them together to get my correct value. (PI = 100.00 and PC = -25.00, the total value that I want is 75.00. I'll have...
  14. M

    Two Crosstab Queries Combined by Sum in to One Query

    Hey All, I've created 2 crosstab queries and I need to combine them in to one query to give me correct values Eg: Table 1 record 1 total is 100.00 and Table 2 record total is -25.00, I need to sum them together to give me a query which shows 75.00. I am looking at a Union Query to do this, but...
  15. M

    Solved Filter Subform by ComboBox

    I have got this code to work for filtering the data from one combo box: 'Forms.Form1.UserLogsubform.Form.Filter = "[Username] = Forms.Form1.Combo2 Or Forms.Form1.Combo2 Is Null" 'Forms.Form1.UserLogsubform.Form.FilterOn = True 'Forms.Form1.UserLogsubform.Requery And I got the following code...
  16. M

    Solved Filter Subform by ComboBox

    The converted macro gives me DoCmd.ApplyFilter "", "[UserName]=[Combo2] Or [Combo2] & """"=""""", "UserLog subform" however it doesn't work. I am working with the following code which works for filtering users but does not show all records when I select the blank...
  17. M

    Solved Filter Subform by ComboBox

    Well I thought that I could but I don't seem to be able to - Please help!! :-(
  18. M

    Solved Filter Subform by ComboBox

    I have just seen your example using the macro, thats amazing!! Thank you!!
  19. M

    Solved Filter Subform by ComboBox

    Hi DBguy, I prefer everything to be VBA, so if thats possible that would be great. I just picked up my example from a Youtube video.
  20. M

    Solved Filter Subform by ComboBox

    Hello, I have a table that logs all my users activities\changes etc and I would like to be able to filter by Employee or Action but I cannot quite get this right. I have my combobox grouped so I can see all my users but when I filter by a user I cannot see the whole table unfiltered - how can...
Back
Top Bottom