Search results

  1. D

    Filtering only Worlds...Real words...

    Set up a new query: SELECT tblWords.fldWord FROM tblWords WHERE (((fncHasBadChars([fldword]))=True)); And fncHasBadChars is: Function fncHasBadChars(str As String) As Boolean Dim I As Integer fncHasBadChars = False For I = 1 To Len(str) Select Case Asc(Mid(str, I, 1)) Case 65...
  2. D

    Form Header Height Problem

    From "Access 97 Developer's Handbook", pg 527, 3rd Ed.: "Access provides no simple way of determining whether a given section has been created on a form or report." It then goes on to give a simple Function code listing that I've modified slightly below. If the attempt to return the height of...
  3. D

    Can't get this SUM-ing right

    I think Pat meant: Select Cust, Sum(IIf(Days <= 20, Amount, 0)) As DaysLessEqual20, Sum(IIf(Days > 20, Amount,0)) As DaysOver20, Sum(Amount) As Total From YourTable Group By Cust;
  4. D

    A CanGrow question

    From Acc97 Help "CanGrow, CanShrink Properties" If you set a control's CanGrow property to Yes, Microsoft Access automatically sets the CanGrow property of the section containing the control to Yes. (However, if you set a control's CanShrink property to Yes, Microsoft Access doesn't set the...
  5. D

    Can't get the syntax down...

    You might try: SELECT DISTINCTROW [MyTable].CustName, Sum([Debit])-Sum([Credit]) AS Date30 FROM [MyTable] WHERE (((DateValue([TransDate]))>=DateValue(Now)-30 AND [MyTable].[CustName] Like [Type in First Few Chars of Customer Name:] & "*")) GROUP BY [MyTable].CustName; I think that syntax is...
  6. D

    Invalid procedure call

    Try this: SHORTPAT: IIf(InStr([PATIENT],',')>0,UCase(Left(Left([PATIENT],InStr([PATIENT],',')-1),10)),UCase(Left([PATIENT],10))) In Acc97, if you put, "SHORTPAT: UCase(Left(Left([PATIENT],InStr([PATIENT],',')-1),10))" into the Field row of the query design grid and [PATIENT] doesn't have a ","...
  7. D

    Multiple Criteria Trouble

    Maybe this'll help... hope so! Beware the function call in the query, beware the code behind the frmSearchMain form, and good luck!
  8. D

    Report Lines

    What I would do is draw a line in the section footer. Any time the section ends on the report - no matter how many pages the report is - we know there will be a "bottom line" for the section (I think you've already done that...). Then I'd draw vertical line seperator segments in the section...
  9. D

    Searching multiple fields problem

    I think I got something that might work... How important is it that the user has to seperate search elements with a space? I'd use a comma and then qualify the text box with a direction like: TextBox Search Syntax: AptName, AptNumber, WhoWalked, WhoCleaned, etc... You can leave an argument...
  10. D

    Query Function Calls...

    Say I have a query that makes more than one function call to the same function in the Where clause of the SQL statement. The function calls would pass an argument such that the function parses a string (form value) into a public array the first time the query makes a call to the function and...
  11. D

    Calculating Time Clock

    Check out the attached - doesn't use any arrays at all... The included table that tracks employees in/out times has only 3 fields: EmpID, TimeStamp, In/Out. Open the form Main and see what you think. It should get you started...
  12. D

    Highlight Current Record

    There is one other minor problem I've found when using the "=IIf([cellwatch]=True,"ÛÛÛÛÛÛÛÛÛÛ",Null))" record source for highlighting records other than the current record (I don't know if the same problem will exist for the current record highlight also...). I'm using a subform to display the...
  13. D

    Highlight Current Record

    The #Name error might mean that a field in the Iif statement is causing Access some problems. Can you post it? As far as someone clicking on the highlight field and making the field opaque, try setting the Enabled property for that highlighting field to No. Nah... setting Enabled to No won't...
  14. D

    Calculating Time Clock

    I would start by reading each employees' In/Out time stamps into a two dimensional array (2 by n) where the first element (1,1) has time In and the second element (2,1) has the subsequent time Out. The next set of array elements have the next In (1,2) and Out (2,2) time stamps for that employee...
  15. D

    Query with true/false fields

    Not to hijack this thread, but if you had: tblPeopleToInterests PeopleID (Number) InterestID (Number) and the table contents were something like: PeopleID InterestID 1 1 1 2 1 3 1 n 2 1 2 2 2...
  16. D

    Use a variable as a control name

    strfromdate=forms("OTDSwitchBoard")("FromDate") Above you are setting the variable "strfromdate" to the value in the "FromDate" control on the "OTBSwitchBoard" form. Whatever value is in the control is now in the variable. set ctl=forms("OTDSwitchBoard")("FromDate") and here you are setting...
  17. D

    Formatting a name column using Text Functions

    Is there a "," (comma) in every name string? If not, "LastName: Left([Borrower_Name],InStr([Borrower_Name],",")-1)" will cause an error because "InStr([Borrower_Name],",")-1)" will return -1 and the "Left" function can't return -1 characters. You can try this: LastName...
  18. D

    Parse to remove end characters

    One idea you might want to contemplate is forcing all the data you are trying to parse into matching what the parsing function is going to expect. IOW, if you don't have a comma in all the strings, put one there (like you just did). If there isn't a postcode sector, add a dummy (like "___", 3...
  19. D

    Parse to remove end characters

    Step through your code again and make sure there is actually a "," (comma) in the street field. If there isn't one in the string, "InStr((Street), ",") - 1" will return -1.
  20. D

    DMax Function

    Hi, mdbBound... Is the WLngNo field in the testWLog table an autonumber field? If WLngNo field is an autonumber, that is not what you're saying when you post this: The above is telling me that WLngNo field is a text field. And if it is a text field, the DMax function posted will not work...
Back
Top Bottom