Search results

  1. I

    Automatically filling a text box based on another

    you could also use some code: Private Sub Date_BeforeUpdate(Cancel As Integer) On Error GoTo e: Me!Expiry = DateAdd("m", 6, DateValue(Me!Date) - 1) Exit Sub e: MsgBox "The value you have entered is not a correct date value" & Chr(10) & Chr(13) & "Please re-enter the date", vbOKOnly, "Error"...
  2. I

    Form - List Box

    Just to expand on Sunny's post, While you in the Query Builder, right click in the Criteria box of the CompanyID and select Build, you can then navigate to Forms>Your Form>Your Control this will then base the Criteria on the Control you have selected.
  3. I

    Sorting entries in a browse form

    You can base your Form on a Query rather than the actual table and set the 'Status' field to Ascending, using a query rather than a table will also help you buffer the data.
  4. I

    Date validation problem

    You are absolutely wrong! You answer you own question in the first post: If I put in the date February 7th 2005 your code will think it's valid. i.e. it is > date - 14 You need to say >date-14 AND <date-28 otherwise ALL dates entered will fine because any date will satisfy one of your Or...
  5. I

    Requery All the Subforms in 1 command?

    You should use the advice provided, the Subforms should have the Parent/Child links set correctly and Me.Requery will requery the Subforms.
  6. I

    form design with tabs, subforms, and mulitple sub entry for 1 main entry

    It can't be done like that, you can only set the focus on a Control in a Subform form the Main form as in my example. You can set the focus on a Subform but not an actual Control. My example is seemless to the user. It also allows you much better control over the events and helps with Shift+Tab...
  7. I

    Updating 3 tables from 1 form

    My answer is this - Try it! On a real note, what tables are on the main form? You could have the form Controlling the main table and the other 2 as Subforms. You can add records, delete etc.
  8. I

    form design with tabs, subforms, and mulitple sub entry for 1 main entry

    There was a lag just before, I'll have to ask Bill about it (not Gates) The following should work ok: http://216.92.17.166/board2/viewtopic.php?t=121643&sid=b0ffe219c3907ec125c8c90be35544fe
  9. I

    form design with tabs, subforms, and mulitple sub entry for 1 main entry

    Your Starter for 10 - Tabbing the forms I had a similar issue about tabbing from subforms and ended up with the following quite nice solution: http://www.mrexcel.com/board2/viewtopic.php?t=121643&highlight= My subforms don't every contain more than one reord though. I'm sure the above should...
  10. I

    Date validation problem

    Hi, You need AND instead of OR. You may also want to use >= And <= and you might want to use ! instead of '.' If Me!txtDate <= Date - 14 And Me!txtDate => Date + 28 Then
  11. I

    A neater way to do the following, Looping through controls

    Sorry Pat, I haven't explained it fully, The EmployeePid is an Unbound Control for display purposes only, (and update later on, PidtoSys Function) When the user clicks Search (My own button, not an Access thing) If there is a value in OriginalOperater then update the EmployeePid with the...
  12. I

    A neater way to do the following, Looping through controls

    the SystoPid is a Function I had help with :) Public Function SystoPid(SysID As Long) Dim dbs As Database, qdf As QueryDef, rst As Recordset, strSQL As String Set dbs = CurrentDb strSQL = "SELECT [tbl_CBO-TPO:EmployeeDetail].Pid, [tbl_CBO-TPO:EmployeeDetail].EmployeeID " & _ "FROM...
  13. I

    pass value to a query

    Design the Criteria of RefNo in the Query for the second form using something like: Forms![1stFromName]![RefNo] If you Right-click the criteria and select Build you can locate the Control you want to take to value form.
  14. I

    Textbox Validation - stopping user putting something other than a date

    Pat, How can I use this Event to set the focus AND clear the contents of the box? I'm just getting my head round Events and geesh!!! :) Both, are the Fields of the Forms Control Source still controls if you don't add them to the form? If so I did not know that! The ones I'm updating are part...
  15. I

    Unique warning on multiple columns

    Hi, I wouldn't use Name either, I always use GivenName (just a preferance, as First Name in some cultures is the Family Name) as the 1st Name. I'm bound to be complicating things for this, but think about the bigger picture in terms of other projects. Consider the fact that people do have the...
  16. I

    Didn't anyone need to set report orientation in code before Access 2003 came along?

    Not sure if this is what you mean? PrtDevMode
  17. I

    Textbox Validation - stopping user putting something other than a date

    I have actually stated that I'm using the BeforeUpdate event, However I mean Format not Validation on the Field. Also, it is updating 3 other Fields bound to the Form not controls actually on it: Me!IpUser = PidtoSys(UserName) Me!IpTimeDate = [Forms]![frm_CID:DC-InputMain].txt_NOW...
  18. I

    Textbox Validation - stopping user putting something other than a date

    Cheers Pat, I'm a little usure of what you mean. I have no validation on the Table or the Control I also not using an Input Mask (I agree with you 100% on that) The field is a Date/Time Field which I'm assuming is causing problem. Where I'm falling down is, I'd like to trap this before I it...
  19. I

    A neater way to do the following, Looping through controls

    All, Can someone please show me a nicer way to achieve the following: If IsNull([frm_UTC1_Subform]![TCUser]) Then [frm_UTC1_Subform]![EmployeePid] = Null Else [frm_UTC1_Subform]![EmployeePid] = SystoPid([frm_UTC1_Subform]![TCUser]) End If If IsNull([frm_UTC2_Subform]![TCUser]) Then...
  20. I

    Textbox Validation - stopping user putting something other than a date

    All, I'm trying to get the correct syntax to Validate a Textbox. I'm trying to use BeforeUpdate bet can't figure out the how. Rules: Person must enter a Date: >=#09-11-04# and <=Date() The problem I have is that I need to run some code to update 3 other Fields on the form, If the above is...
Back
Top Bottom