• WSdBETTSXX

    WSdBETTSXX

    @wsdbettsxx

    Viewing 8 replies - 1 through 8 (of 8 total)
    Author
    Replies
    • in reply to: FTP via ActiveX (or other) from Access (Access 2000) #682262

      Thanks, gents. As always, you’ve gotten me over my “stuck” place. The MSINET.OCX file is on my machine and appears to be super-flexible, in that you simply feed it the desired FTP command and away ya’ go !

      Now all I have to do is reference it and root around and hack up a VBA code block or two to make a full featured FTP thingie with retry and status messages, etc. 😉

      Thanks !

    • in reply to: Outlook Progress Indicator Needed (Outlook 2000 / VBA) #668308

      Oh, Duh! (It’s the easy stuff that cr*ps me up!) THANKS!

    • Thank-you. Much more intelligent. Works just fine! Now, on to the next challenge…

    • Thanks for your reply, Hans.

      You’re right to wonder why I’d want to “go ’round the Horn” to make this report complicated. I’ve always used the bound report approach before. This mess arose as a consequence of trying to have a calculated field in the DETAIL section of the REPORT. While it’s easy to convert a code number (1, 2, 3, 4) stored in the underlying table into a corresponding dollar amount with a calculated field in the REPORT; what I couldn’t do was avoid having the dollar figures themselves hard-coded inside the calculated field (which is to say: trying to do the calculation in VBA, where I could access pre-defined global constants (which vary over time) and define (and change) them easily from a MODULE (as I do everywhere else in this particular application.)) The calculated field always sees inserted variables as PARAMETERS and prompts for them when the report is run.

      I’m going to give up and just go and convert the codes in the table to the correct dollar amounts and store those, (pain in the a**, since I need to dig up the archived values for about 2,500 records) unless you can suggest something more intelligent.

    • Thanks for the replies!

      In my zeal, I didn’t mention that I had added the required While…Wend…MoveNext structure (below), before.

      The code below goes with a REPORT that is unbound (ie no Record Source). It is to run when the REPORT
      is opened. I am now confused by the following:
      =========================================================================================
      Option Compare Database
      Option Explicit

      Dim intCancel as integer
      Dim intFCount as integer

      Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
      fldMYRECNUM = recDATABAG!MYRECNUM
      fldTWO = recDATABAG!TWO
      fldTHREE = recDATABAG!THREE
      MsgBox (“Record ” & recMYRECNUM)
      End Sub

      Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
      fldREPORTTITLE = “Title of Report”
      End Sub

      Private Sub Report_Close()
      recDATABAG.Close
      End Sub

      Private Sub Report_Open(Cancel As Integer)
      Set db = CurrentDb()
      Set recDATABAG = db.OpenRecordset(“Special Query”, dbOpenDynaset)

      recDATABAG.MoveLast
      recDATABAG.MoveFirst

      MsgBox (“Found ” & recDATABAG.RecordCount & ” records”)

      while not recDATABAG.EOF
      Call Detail_Format(intCancel, intFCount)
      recDATABAG.MoveNext
      wend
      End Sub
      =========================================================================================
      This code works and iterates through the record set, except that it gives an error message telling me I can’t assign
      values to fldMYRECNUM, fldTWO and fldTHREE. Yet, I can do exactly this in a FORM. Why is a REPORT different?
      The MsgBox inside the DETAIL lists each record number, proving the DETAIL is executing on each iteration. The
      unbounded textboxes exist in the DETAIL section on the REPORT and appear if I type “Me.” in the code.

      Thanks for any insights!

    • in reply to: Can’t send email (2000) #590161

      I too have had a similar? problem. I have two email accounts on my Outlook. I work offline and do Send/Receive, rather than stay connected. Home mail goes fine thru my ISP. Where I have problems is mail thru by business Exchange Server, which does not seem to like certain SMTP addresses. That is, mail *always* goes if it addressed to someone on the Global Address Book from the Exchange Server BUT, if I add a SMTP address to my local address book and send a mail to that person, the mail will sometimes “hang” in the Outbox (altho’ mysteriously, it will also sometimes appear in the Sent Items folder and I get a “Mail Received” receipt, ie sent but not sent!) I’ve tried re-entering the ENTIRE message (including the address !) with no change. I’ll also sometimes get an idiot message, presumably from the Exchange Server: “Couldn’t Open the Information Store”, whatever the hell THAT means… Most frustrating is the inconsistency, therefore hard to test / diagnose… Any thoughts? Thanks !

      – DB

    • After further experimentation with this problem, I found something curious: ACCESS 2000 appears to refuse to permit referential integrity between tables in the current .MDB file and items which are LINKED from elsewhere (a change from ACCESS 97). It does not help to set exclusive use (Tools | Options | Advanced). Anybody know how to re-establish referential integrity? (The two tables I’m using are linked by a field called “ID” which is an indexed autonumber field in one table and an indexed integer field in the other.)

    • in reply to: JPG Object Exposes Itself? (Access 97) #544417

      No answers were forthcoming, so I heaved a sigh and dug into the .JPG file structure. To save any of you (that might be inclined) the trouble, here is some VBA code that allows you to look into a .JPG file and determine it’s orientation:

      Dim ByteStr As String
      Dim Ydim, Xdim As Integer

      ‘ Open the file for “input”
      Open C:pathnamefilename.JPG For Input As #1
      Do While True
      ByteStr = Input(1, #1)
      ‘ Search for an FFh (255d) byte, followed by a C0h (192d) byte (marker for file size block).
      If Asc(CVar(ByteStr)) = 255 Then
      ByteStr = Input(1, #1)
      If Asc(CVar(ByteStr)) = 192 Then
      ‘ Throw away next two bytes after the FF C0 block marker.
      ByteStr = Input(2, #1)
      ‘ Get the next four bytes. They contain the image dimensions in pixels.
      ByteStr = Input(4, #1)
      Exit Do
      End If
      End If
      Loop
      Close #1
      ‘ The first two of the four pixel bytes contain the “Y” (vertical) dimension.
      Ydim = Asc(CVar(Mid(ByteStr, 1, 1))) * 256 + Asc(CVar(Mid(ByteStr, 2, 1)))
      ‘ The second two of the four pixel bytes contain the “X” (horizontal) dimension.
      Xdim = Asc(CVar(Mid(ByteStr, 3, 1))) * 256 + Asc(CVar(Mid(ByteStr, 4, 1)))

      ‘ Lastly, compare the y-dimension to the x-dimension…
      If Ydim > Xdim Then
      ‘ set OLE picture field (in ACESS form) to portrait orientation
      ‘ Picture dimensions are set in “twips”, see Access Help for definition
      olePicture.Width = 2665
      olePicture.Height = 3073
      Else
      ‘ set OLE picture field (in ACESS form) to landscape orientation
      olePicture_1.Width = 3073
      olePicture_1.Height = 2665
      End If

      Hope you all find this useful! – DB

    Viewing 8 replies - 1 through 8 (of 8 total)