Search results

  1. D

    Understanding the Null

    From the IsNull function description in Access 97 help: So to test for Null, try: If Me.txtEcoTime > 0 And IsNull(Me.txtEcoStar) Then ArgueWithUser End If hth, Doug.
  2. D

    Sorting a report via code

    Try: If SomeBooleanValue = False Then ' Set SortOrder property to ascending order. Me.GroupLevel(1).SortOrder = False Else ' Set SortOrder property to descending order. Me.GroupLevel(1).SortOrder = True End If Hth, Doug.
  3. D

    No "On Current" in Report

    Did you try to put the code in the On (section)Format event for the report? With your report in design view, click on the section of the report where the photo appears. Then use the On Format event. HTH, Doug
  4. D

    sorting by IP

    You almost need a custom function to sort the IP address strings the way you want to (or the way I think you want to). In the query design grid with the field list showing the table that has your IP addresses: Field1: myIPAddressesFieldName table: myTable Show: true Sorted: not sorted Field2...
  5. D

    Highlight Current Record

    My sweet goodness did it help!! Thank you, Thank you!! I just got rid of 99.9% of the code I was using to "conditional format" records in a subform I spent days coding to run.... Wow! Take my previous post and forget it - it's not even close.... The one problem I did have... The order in...
  6. D

    Highlight Current Record

    i've got one working (sort of like what you need to do). It's dirty, very limited in scope, and pretty complex. The only reason I spent days coding that thing is because I absolutely had to have it. What you basically have to do is design a subform that you can place on your main form as...
  7. D

    Using .Requery on a form which got a subform, with another subform in it *headache*

    try: Forms![_frmPerson-Vehicle]! [tabsubPerson].form![subqryPersonVehicle].Requery hth.
  8. D

    Accessing subforms through control buttons

    Ifyou want to access fields in your subform from a command button on the main form, the syntax to use in the On Click event for the button on the main form is: Me![Main Form Control Name of Subform].Form![Control Name on SubForm] So if the subform control name on your mainform is My_SubForm...
  9. D

    Subform Recordset not Updatable

    Hi, good people! The problem I'm having is that the query recordset for a subform is not updatable, and not because of the properties of the subform. This subforms' query consists of a main query with a nested subquery and the nested subquery in turn has it's own subquery. And to boot, the...
  10. D

    I really have no idea!

    try: =iif(isnull(forms![mymainformname]![my sbfrm control name on main form].form![my control name on subform]),0,forms![mymainformname]![my sbfrm control name on main form].form![my control name on subform]) Doug.
  11. D

    Another Custom Sort Issue

    The reason the extra digit is showing up is because in the expression I suggested, the ‘& Right([yourtablefieldname],Len([yourtablefieldname])-InStr(1,[yourtablefieldname],"."))’ section finds the “.” character in [yourtablefieldname] and returns all the characters to the right of the “.”...
  12. D

    Use code to select textbox

    I'd be kinda suprised if the poster didn't also have to perform some type of string conversion function for the concatenation used for the textbox name... basecheck = “check” & Format(x) basetext = “text” & Format(x) Doug.
  13. D

    Delete 0 After Dash

    I understand, but shouldn't it return 0001-10-10?
  14. D

    Delete 0 After Dash

    Doesn't the Replace function replace all the "0"s (0001-010-010)? Yet a third solution: Function fncDelZeros(fld As String) As String While InStr(1, fld, "-0") > 0 fld = Left(fld, InStr(1, fld, "-0")) & _ Mid(fld, InStr(1, fld, "-0") + 2) Wend fncDelZeros...
  15. D

    Another Custom Sort Issue

    Step By Step… Hi, Rhonda. It’s important to understand that when Access sorts strings, it sorts them alphabetically. When numbers are treated as strings - and any time numeric and alphabetic characters are joined together in a field, that field is implicitly a string - Access is going to...
  16. D

    Postcode data

    Picking a Nit... Is there anything wrong with this: Public Function SplitCode(strPostal As String, booPart As Boolean) As String SplitCode = Right(strPostal, 3) If booPart Then SplitCode = Left(strPostal, InStr(1, strPostal, SplitCode) - 1) End If End Function Thanks, Doug.
  17. D

    Another Custom Sort Issue

    Why not use: Field1(not sorted): [yourtablefieldname] Field2(sorted Ascending): Expr1: Format(Val([yourtablefieldname]),"0000.0") & Right([yourtablefieldname],Len([yourtablefieldname])-InStr(1,[yourtablefieldname],".")) Here the InStr function returns a numeric value indicating the position...
  18. D

    Help with requery on button click

    Try: ctl.Form.Requery I have noticed a difference when requerying controls-vs-forms. If my code is: Me!MainFormSbFrm.Requery 'requery the sub form control I'll see my sub form keep the same current record as before the requery. Where as: Me!MainFormSbFrm.Form.Requery always makes the...
  19. D

    VBA Code for dates

    There's problems with the values being used to find future pub and cutoff dates. Putting your fields in chronological order - The current Publication cutoff date is calculated by [FlipEffDateStart] –83 The current Publication effective date is calculated by [FlipEffDateStart] –56 The Next...
  20. D

    Form Flds to default based on other flds

    So you're trying to code the query the form is based on? In a blank Field field of the Query Design Grid: Addrss: Iif(Len([POCITY] & " " & [STATE] & " " & [POCODE]) > 2, [POCITY] & " " & [STATE] & " " & [POCODE], [FLNR] & " " & [STNR] & " " & [STREET] & Chr(13) & Chr(10) & [CITY] & " " &[STATE]...
Back
Top Bottom