Search results

  1. M

    Cool Search Tool Recordsets

    Here you go. There's a lot of stuff in there I'd change, but it's your code, so I didn't do much beyond getting it working. I assume the form fTankInfo is supposed to not yet be functional because there are a lot of broken references in there. Anyway, all I did was take out the references to...
  2. M

    Mail Merge: MS Word Cutting off Text

    Change that "Column(2)" line to be a DLookup and you should be okay. Change this: WordObj.Selection.GoTo what:=wdGoToBookmark, Name:="Letter_Text" WordObj.Selection.TypeText [letter].Column(2) To this: WordObj.Selection.GoTo what:=wdGoToBookmark, Name:="Letter_Text"...
  3. M

    VBA Reset

    There is a better way. Not only should you set everything to nothing (and make sure it's everything), you need to explicitly refer to Excel each time you use it. So, make sure you are closing the Application, the workbook, and the worksheet with something like this: Set XLApp = Nothing Set...
  4. M

    Cool Search Tool Recordsets

    A number of things here: 1) You can change this: Me.username = "Current User: " & fSystemUserName To this: Me.username = "Current User: " & Environ("UserName") This also allows you to completely get rid of the Module called UserName. 2) You keep referring to Me.RecordsetClone, but the...
  5. M

    Mail Merge: MS Word Cutting off Text

    Yes, that's the issue. Are the letter title (Compliance, non-compliance, etc.) in the same table with the letter text (what is currently being cut off)? If so, the solution will be easy. If not, how is one related to the other?
  6. M

    Cool Search Tool Recordsets

    Can you take most of the data out, zip it, and post it? Don't leave any sensitive data in there (if there is any), but leave a few records for testing purposes. We'll get an answer a lot faster that way as I'm having to guess at existing structures. If I can see it, I'll probably be able to...
  7. M

    Mail Merge: MS Word Cutting off Text

    Whoa. That's an issue. What's this doing? WordObj.Selection.GoTo what:=wdGoToBookmark, Name:="Letter_Text" WordObj.Selection.TypeText [letter].Column(2) Is the letter part of a listbox or something? That sort of reference will only return 255 (or less) characters. You'll need to get the...
  8. M

    Cool Search Tool Recordsets

    I'm not sure what the issue is here. Set a breakpoint on the line that is bombing, go to the immediate window, and see if you can hit the recordsetclone from there. In steps: 1) Put a breakpoint on the line starting with the DoCmd in the DblClick event. Do this by clicking in the left margin...
  9. M

    Mail Merge: MS Word Cutting off Text

    All of those are cutting off at the 255 mark (253 for the first sample, 254 for the second, and 253 for the third). It's dropping because Word won't put out half a word, so that's why it's stopping just short of 255. Anyway, how are you exporting this stuff? Are you using the built-in...
  10. M

    Cool Search Tool Recordsets

    First, you can lose all the extra variable declarations. Second, I'm not positive this will work, but try referencing the RecordsetClone directly, like this: Private Sub TankList_DblClick(Cancel As Integer) DoCmd.OpenForm "ftankinfo", , , "[TankNo]='" &...
  11. M

    VBA Reset

    VBA.Reset just closes all the open files in a DB. The equivalent of clicking on Reset is this: DoCmd.RunCommand acCmdReset However, I don't know why you'd want to do this in code (and honestly, I'm not sure you can programmatically do this while code is actually running). What is happening...
  12. M

    Mail Merge: MS Word Cutting off Text

    As a quick guess, is the textbox on the form letter in Word set to "CanGrow" and "CanShrink"? I'm not positive those are even options in Word, but I think they are. Beyond that, at what point does the template start cutting off? Does it handle just a sentence or two fine, and then "cut off"...
  13. M

    Combo box/Listbox Help

    Yes, it means I either didn't get the field name correct and/or the table name correct. However, I went with what you originally said are the names of your objects: If those names are not correct, they'll need to be correct in the SQL. The structure for the RowSource is exactly the same as...
  14. M

    Joins

    Well, how do you think you join the tables? What have you tried? What issues did you run into?
  15. M

    Filter by selection in VBA code

    Don't use the ActiveControl property. Use the name of the control. For example, a textbox named txtMyTextbox is: txtMyTextbox.Value
  16. M

    Checkbox issue

    OK, to be polite, this is a broken DB. ;) There are a number of things just not right with the setup, but instead of going into paragraphs of detail, I'll keep it short and then post a response sample DB. In short, it's not normalized at all, and there are a few two many tables than needed...
  17. M

    Password issue: A2003/A2007 compatibility

    The crashing thing is probably a result of not having the SP3 hotfix for Access, assuming you have SP3 in the first place. I had a very, very similar issue where just resizing a form in design mode and then opening it in Form View would crash Access. Very strange behavior that the hotfix...
  18. M

    Combo box/Listbox Help

    You'll do it in the listbox with a query as well. You set the RowSource property of the listbox to your query. You can make two boxes here. One drop-down combobox has your key value -- the SCAC value -- and that is connected to a listbox showing all the relevant CName values. For example...
  19. M

    Password issue: A2003/A2007 compatibility

    Also, I wonder if at work, he's part of an Access workgroup, at which point he'd need to bring home the MDW file as well and then connect to it. Pain in the butt, yes, but lots of places do that intentionally.
  20. M

    Your help in Default Value?Please

    Here's a sample for you. A few things to look at: 1) Look in the relations from the DB window. You'll see that I'm enforcing referential integrity, which ensures that the two tables stay in sync. 2) The form (f_Main) is based on a query. This query takes the two tables and pulls the...
Back
Top Bottom