Search results

  1. J

    Automate Import Process

    I've been looking into this and was wondering if anyone could confirm the following method of importing an XLS table. Actually, the Sub doesn't work as-is. There's an error: "User-defined type not defined" and it points to: Dim CD As CommonDialog Also, I don't know if I'm using the...
  2. J

    Using content of selection in extended list box

    Is there a better/easier way to use the content of the current selection in an extended list box? Do I have to use the .Selected(varItem) type of method: Dim varItm As Variant For Each varItem In Me.LstTables.ItemsSelected Me.TxtField = Me.LstTables.Selected(varItem) Next...
  3. J

    character-in-string search function

    Neat. The only problem I've still got is that it doesn't let me search for the ] bracket. I assume because it's looking for the first ] bracket as a special character in the same manner as it was looking for the first [ bracket. Works: If Me.TxtRename Like "*[`!['.]*" Then Doesn't work: If...
  4. J

    character-in-string search function

    I've not heard much about the Like operator and it seems fishy to me. How standard is its use; would you recommend it above the InStr function? Anyway, I tried the code and it does not work for checking the bracket characters [ and ] for some reason. The error is Invalid String Pattern (93, I...
  5. J

    character-in-string search function

    Thanks, Shadez and Mile-O-Phile, for your assistance. This is what I was looking for: If InStr(1, Me.TxtRename, "!", vbTextCompare) Or _ InStr(1, Me.TxtRename, ".", vbTextCompare) Or _ InStr(1, Me.TxtRename, "`", vbTextCompare) Then MsgBox "The characters:" & vbCrLf & "! . `" &...
  6. J

    character-in-string search function

    Is there a specialized function that returns a true/false-type value if a given character is found in a given string? I've looked but have not found one, though this type of thing seems like it should be available (from what I've seen of VB so far).
  7. J

    delete user-selected table(s)

    Of course, I might have noticed that but I was trying to figure out how the Dlookup and NZ functions worked. (It works, thanks.)
  8. J

    delete user-selected table(s)

    I think I understand how the formula's supposed to be working, but I don't know about the part where you say that it tries to set 1 = 1 (and returns true) or Null = 1 (and returns false). My point is that the formula isn't working. If Nz(DLookup("[Type]", "MSysObjects", "[Name]=...
  9. J

    delete user-selected table(s)

    wow, that works nicely. so much for my loopity-loop stuff. thanks again, dcx693.
  10. J

    delete user-selected table(s)

    alright. i could use a clue. the blue text is the stuff that's supposed to do the checking for duplicate names. Private Sub BtnRenameOK_Click() If Me!LstTables.ItemsSelected.count > 0 And Len(Me.TxtRename > 0) Then If Me!LstTables.ItemsSelected.count < 2 Then Dim...
  11. J

    delete user-selected table(s)

    oh. good.
  12. J

    delete user-selected table(s)

    thanks. my main goal, obviously, is to get the code working. but it's also fun to figure some things out myself. (i'm not telling you to stop feeding me answers!) :) now all i have to do is perform a check to make sure the user isn't trying to change the name of a table in the list to a name...
  13. J

    correct syntax: bangs or dots?

    what is the correct syntax? Me.Control.Property or Me!Control.Property Forms!MyForm.Control.Property or Forms!MyForm!Control.Property
  14. J

    delete user-selected table(s)

    got it: For Each varItem In Me.LstTables.ItemsSelected DoCmd.Rename Me.TxtRename, acTable, Me.LstTables.ItemData(varItem) Next varItem that is more efficient than For Each varItem In Me!LstTables.ItemsSelected For count = 0 To Me!LstTables.ColumnCount - 1 DoCmd.DeleteObject acTable...
  15. J

    delete user-selected table(s)

    thank you. in the mean time, i'm still having trouble with the code to rename a table in the list. (where TxtRename is a text box that the user types a name into for renaming purposes): DoCmd.Rename Me.TxtRename, acTable, Me.LstTables.Selected(ItemsSelected) Basically, I don't know how to...
  16. J

    toggle button controls visibility

    got it: Private Sub TogButton_Click() If TogButton = 0 Then Me.Txt01.Visible = False Else Me.Txt01.Visible = True End If End Sub
  17. J

    delete user-selected table(s)

    ADO, i think.
  18. J

    toggle button controls visibility

    I want to be able to use a toggle button to make certain other controls and fields visible when the toggle button's state is "down" and invisible with the toggle button's state is "up." Is this possible? I'm assuming I would have to add the code checking to the Form->Click sub-procedure so that...
  19. J

    delete user-selected table(s)

    Access 2000
  20. J

    delete user-selected table(s)

    I'm trying to allow the option for the user to rename a selected table in the list box. 1) can I utilize a built-in pop-up box (like MsgBox) to ask for the new name, or do I have to create a new modal form? 2) i was trying to use the following code, but the last parameter of the DoCmd.Rename...
Back
Top Bottom