• WSMarkU

    WSMarkU

    @wsmarku

    Viewing 15 replies - 16 through 30 (of 31 total)
    Author
    Replies
    • in reply to: Cannot access certain documents (XP Pro SP-2) #1032745

      I’ve got this problem for a PDF in a certain folder on our domain (Windows Server 2003 with NTFS). We’ve had files in the same folder loose all security permissions, but I was able to sort these out by taking ownership.

      This time, since there’s no security tab, I can’t take ownership. I’ve tried forcing down ownership from the folder above, but it gives an error for the file in question. Simple file sharing is not turned on (it’s not even available).

      Any more ideas from anyone?

      Thanks,

      Mark

    • in reply to: Code to pull existing info into new record (Access 2003) #1028085

      In case it’s useful to anyone, I’ve got the following code for copying all fields (except for AutoNumber):

          Dim rst As Recordset
          Dim fld As Field
      
          Set rst = Me.RecordsetClone
          rst.AddNew
          For Each fld In rst.Fields
              If (fld.Attributes And dbAutoIncrField) = False Then
                  Debug.Print fld.Name & "(" & fld.Type & ") = " & Me.Controls(fld.Name)
                  rst.Fields(fld.Name) = Me.Controls(fld.Name)
              End If
          Next fld
          rst.Update
      

      It seems to work okay, though I haven’t tested it fully yet.

    • in reply to: ‘Date Updated’ field (MS Office 2000) #1019860

      That did the trick.

      Thank you very much, Hans!

    • in reply to: ‘Date Updated’ field (MS Office 2000) #1019855

      I’ve used a similar code to record the “last updated” date (except I’ve used Now() to give the time as well). This works well under most circumstances.

      However, I also have a ListBox (lstSelect) on the form for selecting records. When I use this ListBox, I get the error, “Update or CancelUpdate without AddNew or Edit.” When an item is selected in the ListBox, the ListBox’s AfterUpdate event runs the following code to select the record:

          Me.RecordsetClone.FindFirst "[RecordID] = " & Me![lstSelect]
          Me.Bookmark = Me.RecordsetClone.Bookmark
      

      The form’s BeforeUpdate event is then activated, but when it tries to change the “last updated” field, it’s already moved to a new record, hence the error.

      Does anyone have any idea how to avoid this problem?

      PS – I’m using Office 97 (just in case that makes any difference – I’m not after sympathy!)

    • in reply to: Select first row of ListBox (97 SR-2) #996526

      Thanks a lot, Hans!

      For anyone else with a similar problem, the only other thing I had to do was to call the ListBox’s AfterUpdate event from the form’s Activate event. This then found the record specified by the ListBox.

    • in reply to: Months and Years as Headers in a Crosstab Query #940963

      Thank you, Hans, for the code. It works perfectly.

      I was planning that the user could simply view the crosstab query directly, but I’m intrigued by your suggestion that I use it as a source for a report. Is it possible to create a report from a source that doesn’t have fixed field names?

      By the way, although I’m using Access 97, I probably will have Access 2003 within the next year, and I think that will give me many more options.

      Thanks once more for your help!

    • in reply to: Months and Years as Headers in a Crosstab Query #940767

      Wow, what a response! In the time I wrote my thoughts on the first two replies, two more came in!

      I think the VBA route is probably the one to go for in this case, because it doesn’t require months/years to be pre-populated in a query or table.

      Thanks for your help, everyone!

    • [indent]


      You can also refer to these text boxes in code. Alternatively, you can use SubformName.Form.Recordset.RecordCount.


      [/indent]
      I tried this and it didn’t work. I had to use RecordsetClone instead (i.e. “SubformName.Form.RecordsetClone.RecordCount”). For example:

          If Me!subfrmTest.Form.RecordsetClone.RecordCount < 1 Then
              'Do something
          End If
      
    • Thanks for the tip! This will save me a lot of time.

      Does anyone know if it’s possible to access this “permenent delete” command via a menu button?

      How about through VBA? I’m thinking about a macro to clear out my spam folder.

    • Thanks for the tip! This will save me a lot of time.

      Does anyone know if it’s possible to access this “permenent delete” command via a menu button?

      How about through VBA? I’m thinking about a macro to clear out my spam folder.

    • in reply to: First Normal Form Normalisation (Access 97, Win 2000) #826806

      I’m trying the DAO route as suggested. It’s going well so far. I’ll let you know what happens. Thanks for your help!

    • in reply to: First Normal Form Normalisation (Access 97, Win 2000) #826807

      I’m trying the DAO route as suggested. It’s going well so far. I’ll let you know what happens. Thanks for your help!

    • in reply to: Multiple labels from each record (Access 97, Win 2000) #790028

      Perfect! That works really well. I’ll have to study the code to find out how. Does the “Me.NextRecord = False” force the report to call the event again?

      I knew it had to be possible, but I’m pretty sure I would never have stumbled upon that solution by myself. Certainly the hours I’d spent looking through Help etc. hadn’t got me anywhere.

      Thank you so much for your help!

    • in reply to: Multiple labels from each record (Access 97, Win 2000) #790029

      Perfect! That works really well. I’ll have to study the code to find out how. Does the “Me.NextRecord = False” force the report to call the event again?

      I knew it had to be possible, but I’m pretty sure I would never have stumbled upon that solution by myself. Certainly the hours I’d spent looking through Help etc. hadn’t got me anywhere.

      Thank you so much for your help!

    • in reply to: Using One Macro for Several Worksheets (97 SR2) #655000

      Thanks to everyone for their help on this.

      I’ve come to the conclusion that the ends don’t justify the means on this, so I’m just going to create an add-in and let the users add a link to the macro as they wish. However, I will keep the more complex solutions suggested in mind for the future!

      Thanks again!

    Viewing 15 replies - 16 through 30 (of 31 total)