Search results

  1. rockman

    Creating text files from a single file

    Sorry Kapay, don't quite understand your post. You have a text file with the follownig lines?: DoCmd.OpenForm DoCmd.Execute txtField.Setfocus And you want to generate new text files? What information is supposed to go into the new text files?
  2. rockman

    Check Boxes

    I'd go with a separate boolean (yes/no) field for each of the selections. It would be possible to develop code to store the information in one field but I see no benefits to doing that way. IMHO, Jeff
  3. rockman

    Help!!

    Furthermore, the variable has to be declared outside of a sub or function. If the two subroutines are within the same form module add "Public myMonth As Integer" at the top of the form module. If the two subroutines are not within the same form module, add "Public myMonth As Integer" at the...
  4. rockman

    need to create generic code

    Create a Public Sub in a project module. Pass the form as an object to the Sub. Example: In a module- Public Sub PerformTask(fForm as form) .... End Sub In each form- Private Sub Form_BeforeUpdate Call PerformTask(Me) End Sub HTH, Jeff
  5. rockman

    count number of characters while they are being typed

    You can only use the .Text property when a particular control has the focus. Therefore, try something like this: Private Sub txtDetails_KeyDown() If Len(txtDetails.Text & txtBox1.value & txtBox2.value) > 150 then Call HitLimit End Sub Private Sub txtBox1_KeyDown() If...
  6. rockman

    SQL statement in VBA Concatenation

    Glad to here of your success! Good Luck with the rest...
  7. rockman

    TwipsPerPixel

    DW, Exactly what I was looking for!! Thanks for the suggestion.
  8. rockman

    TwipsPerPixel

    In Visual Basic 6.0 the Screen object has properties TwipsPerPixelX and TwipsPerPixelY. I can't find these properties in VBA. Are they non-existent, and if so, is there a work-around? Thx, Jeff
  9. rockman

    SQL statement in VBA Concatenation

    A Design Suggestion... I think it might be easier for your end-user (even if you're the end-user) to have a model textbox entry and SN textbox entry. Your SQL statement would then look like: "WHERE (tblMeterData.Model Like " & [Forms]![frmAdminEntry]![Text7] & ") AND (tblMeterData.SN Like " &...
  10. rockman

    SQL statement in VBA Concatenation

    I think your problem still rests in the string concatenation. The phrase [Forms]![frmAdminEntry]![Text7] should not be directly quoted. Move it outside of the quotes. And then view your strSQL string (Msgbox strSQL) to see if it makes sense. HTH, Jeff
  11. rockman

    List Box thing.

    Listing Forms Taylor the AllForms collection to your needs: AllForms Collection Example The following example prints the name of each open AccessObject object in the AllForms collection. Sub AllForms() Dim obj As AccessObject, dbs As Object Set dbs = Application.CurrentProject '...
  12. rockman

    List Box thing.

    Constructiv criticism... Really Best try to avoid GoTo in your programming. It may not seem that big of a deal now but it's sound advice. Instead of: For Each A In Application.CurrentDb.tabledefs Y = Mid(A.Name, 1, 4) If Y = "Msys" Then GoTo x Else z = z & " " & A.Name & ";" x: End If...
  13. rockman

    Trapping the close box

    dynamictiger, If I understand your post, one could use RunCommand with acCmdUndo to undo changes (presumably in a BeforeUpdate event). This is true, but does not solve the problem of determining if the BeforeUpdate was generated by the close box clicked or by a different method (e.g. a menu...
  14. rockman

    Trapping the close box

    I have not come up with a slick solution. The idea about trapping the BeforeUpdate event and then using a global variable to determine why the BeforeUpdate was called (e.g. "Save" button was clicked vs. close box was clicked vs. etc...) seems to be my best bet. It is a bit of a clug... I have...
  15. rockman

    Trapping the close box

    RichMorrison, LOL on your last post. Thanks for your input. Sincerely, Jeff
  16. rockman

    Trapping the close box

    Thanks for your help all. RichMorrison, Unfortunately the Close event occurs even farther down the line: Unload Þ Deactivate Þ Close David, It looks like the global variable idea is the only way to go. Thanks for the suggestion.
  17. rockman

    Trapping the close box

    Rich, The BeforeUpdate call maybe what I am in need of here. I'll work on it, or if you have some code that would be good too. The one problem that I foresee is that the subroutine will not know if I'm updating the record by closing the window (via the close box) or if I'm updating the record...
  18. rockman

    Trapping the close box

    Excuse my frankness but --- "YuK" I don't like the suggestion of getting rid of the close box. It is a standard operating system control and users are accustom to it's use. Any other thoughts? Jeff
  19. rockman

    what is a 'user profile' and how do I...

    Setting Access application options Dear Mel, You posed an interesting question. Frankly, I had no idea how to set the Access options from code. I figured I might have a need to do this myself in the future, so I spent some time with it. This is what I found: Application.SetOption...
  20. rockman

    Trapping the close box

    Rich, I'm referring to the close box on an individual form. Thx for any help, Jeff
Back
Top Bottom