Search results

  1. jimbrooking

    record not found

    R- You could use the DCount function: If Dcount("User","Administration","User LIKE ""(*" & Printer & "* ))""") = 0 then Msgbox "No printers for you..." Exit Sub End If (You will need to fool with the third argument in the DCount call as I'm not sure it parses correctly the way it's written...
  2. jimbrooking

    Resize a textbox to fit a user selected font/size

    Nancy- This is an interesting problem. I think the font size is given in "points", which is an old typesetting term. A point is 1/72 of an inch. You might fool around with setting the height of the box to something like 0.1+CDbl(tbxFontSize)/72., where the 0.1 is to account for the top and...
  3. jimbrooking

    Are arrays of control objects possible?

    Steve, You can set the form's Default View to Continuous Forms, and that will show all the records in the recordsource (or as many as will fit on the form). You can show a vertical scroll bar to "get to the bottom of things". If you want to tie the recordsource to something like a customer...
  4. jimbrooking

    Linking

    Peggy, Say the form's input field is tbxText, and the underlying table is called tblTable, and has a field in it called ID. Say the field you do not want duplicate values in is called Unique. In the form's BeforeUpdate event put some code like If DCount("ID", "tblTable", "Unique = """ &...
  5. jimbrooking

    Problems Incrementing by 1 in VBA

    Try this: Tempa = Left(SerialNumber, 3) Tempb = Mid(SerialNumber, 4, 4) Tempc = Format(Tempb + 1,"0000") Tempd = Tempa & Tempc [This message has been edited by jimbrooking (edited 08-01-2001).] [This message has been edited by jimbrooking (edited 08-01-2001).] [This message has been edited...
  6. jimbrooking

    Extra space at bottom of form in Access

    Talismanic- After you switch to Form View click Window>Size to Fit Form, Then Ctrl-S to Save the form. It should resize to your design dimensions, and the Save will make it remember next time it opens. Take care when you are in Design View - if you resize the form to see more of it, then save...
  7. jimbrooking

    fill empty field with *

    I have filled yet another gap in my knowledge of Access/VBA. The String Function does what's needed. Editing dhoffman's function: Public function FormatAddress(address as variant) as string FormatAddress = Trim(address) & String("*",70-Len(Trim(address)) End function Still need to worry about...
  8. jimbrooking

    fill empty field with *

    If the field is named tbxAddress you could (maybe in the OnFormat event) write ---begin--- intLen = 70 - Len(me.tbxAddress) strStars = "" For intI = 1 to intLen strStars = strStars & "*" Next intI Me.tbxAddress = Me.tbxAddress & strStars ---end--- You may want to add error checking in case...
  9. jimbrooking

    No Records "Message"

    You could also place a label on the form with Name lblNoData and Caption "No Messages. Lucky!". In the Form's OnOpen event write Me.lblNoData.Visible = (DCount("AnyField","qryMessages") = 0) [This message has been edited by jimbrooking (edited 07-14-2001).]
  10. jimbrooking

    Error Mesage

    Check out http://support.microsoft.com/support/kb/articles/Q182/8/67.ASP?LN=EN-US&SD=gn&FR=0&qry=3197&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=ACC97 (This is a single URL - if it spans multiple lines you need to edit until it all fits in the browser's Address field.)
  11. jimbrooking

    Darn Null Problems

    This used to be a major problem with me, too, until I discovered the Nz function. Its syntax is Nz(TestValue,ValueIfNull). If the TestValue is Null, then the ValueIfNull is returned. Otherwise the TestValue is returned. So Nz(Null,"N/A") returns N/A Nz(Null,0) returns 0 Nz(10,0) returns 10...
  12. jimbrooking

    Date format question

    Suggest you remove the input mask entirely. That way you can enter 6/26 and it will be interpreted as 06/26/01. You might also change the Format property to something like "mm/dd/yyyy" to obtain a consistent display format, in this case, 06/26/2001. Jim
  13. jimbrooking

    Filling text box values

    You could write a loop using the DateAdd function to cycly through 1-year increments, exiting when the DateAdd value exceeds Now(). If N is your counter, then on exit, N years from the employee's anniversary date would be the NEXT anniversary date, and N-1 years would be the last anniversary...
  14. jimbrooking

    command buttons

    Check out the OutputTo Action (or the OutputTo method of the DoCmd object).
  15. jimbrooking

    Validation Dilemma

    You could also put something like the code you listed in the field's BeforeUpdate event handler, and set Cancel=-1 if there's an error in the field. Try (In the Combo20 BeforeUpdate event): If Nz(Me.[Combo20],"") = "" Then Msgbox "You must enter a payor" DoCmd.GotoControl "Combo20" Cancel = -1...
  16. jimbrooking

    SUBFORM

    You could have the Default View for the subform be Continuous Forms. This would show as many records as could fit in the space you allocate for the subform.
  17. jimbrooking

    Multiple field lists?

    Steve, You could make up a query if the tables have something in common like an employee number, order number, etc. Then base the form on the new query. There are constraints on when queries are updatable and when not. (If not updatable your form will not be able to change values.) See...
  18. jimbrooking

    close form after last textbox is entered

    Well, if you're very sure the user will not use the mouse to change the "last" field, then expect to go somewhere else on the form to change something else. (Silly users!) You could stick a DoCmd.Close in the "last" field's AfterUpdate event (not the Form's). The user will have to do something...
  19. jimbrooking

    macro/event procedure that runs on print command

    If it was mine-- I'd add a "LastUpdate" Date/Time field and a RevisionNumber Numeric field to the underlying table. Set the RevisionNumber to 1 (or any integer). You have a form that is used to edit the information in the table (that will appear in the report)? If so, you could use the above...
  20. jimbrooking

    Date Activated Events

    Gin up a query that finds all the records that suite your criterion. Something like Select * From tblNotes Where DateAdd("ww",-2,TableDateValue) < Now(); (This query could be the recordsource for a form to be called later.) On the Tools > Startup... screen, identify a form to open when the...
Back
Top Bottom