Search results

  1. 1

    help! dlookup

    what are you some sort of bully? your ## are the only things that helped me out your other changes were.....once again pretty useless :)
  2. 1

    help! dlookup

    Dim project1 As Control Dim friday As Control Set friday = Forms("frmTimesheetManager").Controls("txtDay6") project1.Value = DLookup("[Project ID]", "tmptblHours", "[TS_Date] = " & friday.Value) HELP! This dlookup thinks my TS_Date criteria is a Null. Anyway around this? Cheers EDITED = By...
  3. 1

    does the check box cause double entry?

    Yep Gemma thanks for that. The SQL query is no longer necessary and I'm only using a save command now.
  4. 1

    does the check box cause double entry?

    Hmmm....yeah the form is bound to the table. So I guess I should just run a save command instead of the append query? I'll be giving it a go now...
  5. 1

    does the check box cause double entry?

    Nope...didn't help sorry
  6. 1

    does the check box cause double entry?

    Hi all, I've got a simple form that either "saves" or "appends a new" contract type into a small table. The table has a "yes or no" check box as well as the form. Has anyone had a strange problem where your "INSERT INTO" query appends two of the same row? I've got pics and my code below...
  7. 1

    function vs private sub

    Hi all, smee again. I've picked up from this forum some naming conventions for form controls. Also some habits with data types behind the scenes in VBA. I'd like to know more about how you all decide when to have functions as a "general" function (hopefully you know what i mean...) or as an...
  8. 1

    my table design

    cheers all ive made a new field on tblHours called Payment its a calculated field (hours worked * hourly rate)
  9. 1

    "On Dirty" in bound and un-bound forms

    Hi all, as an Access newbie I'm slowly picking things up. I'm just here to confirm something I've noticed. So far I've made 3 forms...one of them is bound the other two are un-bound. (By bound and un-bound, my understanding of the difference between the two is that bound forms have a query in...
  10. 1

    calculation within a query?

    sorry wayne...u've misread my question in my query, the 5th value going into tblHours.Payment is not tblEmployee.[Hourly Rate] instead, its actually tblEmployee.[Hourly Rate] * Box (where Box is a textbox with number of hours worked) Sorry about my messy code...but I've tidied it up as follow...
  11. 1

    calculation within a query?

    Hi all, Please have a quick look at my awesome VBA code... strSQL = "INSERT INTO tblHours ( [Project ID], [Employee ID], TS_Date, TS_Hours ) VALUES (" & selectproject & ", Forms!frmEmployeeTimesheet!cboSelectName, " & CStr(datebox) & ", " & CStr(Box) & ");" DoCmd.RunSQL strSQL...
  12. 1

    name of combo box

    Well I have 5 different rows, at the beginning of each row is cboSelectProject1 - 5. After each combo box, the rest of the row are 5 text boxes. Each combo box's "after update" executes =vbaFunction() which is to set a default value to all of its corresponding text boxes only for that row...
  13. 1

    name of combo box

    Hi all, I have a combo box (cboExample) that runs a function (vbaExampleFunction) at the "after update" event. Is it possible in the code, to call the NAME of the combo box? Ie. cboExample.Name ??? I've seen some code where someone was able to get the name of the currently open form (if...
  14. 1

    Dynamic object variables

    I've tried the first approach, and failed. Even tried declaring projectcbo as string although I'd normally use control. Nevermind, I prefer your 2nd method. You really are an MVP. Thanks this will help me a great deal.
  15. 1

    Dynamic object variables

    hi wazz...the problem isnt the loop the loop works fine ken ultimately im asking if using strings to set names to object variables is possible let me clarify projectcbo = "Forms!frmEmployeeTimesheet!cboSelectProject" & project_count this works because projectcbo and project_count were declared...
  16. 1

    Dynamic object variables

    Hi all, I have some code similar to what I've written below... Function vbaExample() Dim counter As Integer Dim frm as Form Dim box as Control Set frm = Forms!frmExample counter = 0 Do counter = counter + 1 box = "frm.txtBox" & counter MsgBox box.Value Loop Until counter = 5...
  17. 1

    my table design

    Most of you's should be familiar with my little project by now. If not, I'm doing a little timesheet system for a friend's architecture company. I started off with designing the forms, then quickly realised VBA is much more flexible than macros from everyone's help here. BUT, now I've realised...
  18. 1

    two functions into one?

    Gees, you guys weren't kidding. Yeah I've just put in the name of the function and it worked! Cheers fellas
  19. 1

    two functions into one?

    Hahaha... If you can at least give me a small clue such as the calling command I can search the forum for more useful information?
  20. 1

    two functions into one?

    Alright, so how do I code for this to happen?
Back
Top Bottom