Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Just a fun program to use with Access. ((97/2k))

    I replied to a post last night, and included an attachment which I wanted to get some feedback on. <!post="Clicking Okay Button",238098>"Clicking Okay Button"<!/post>

    It's just a nifty little VB program, that 'repeats/mimics' Access dialog windows (query criteria prompting, Login boxes, etc etc.). I actually posted to several threads last night, and got replies on a lot of them, but this one I was really hoping to get some 'reactions' too. I know this sounds like I am starving for attention, but I really thought this little program was neat. Relatively useless, but neat. (Read the post <post#=238098>post 238098</post#>, it explains what the program does, how to use it, and why I built it.)

    So post back with your initial reactions! <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15> (let me have it!) <img src=/S/bash.gif border=0 alt=bash width=35 height=39> (also, I am curious what versions of Access this works in....I only really tested it in 97....but it should work for 2k and XP....if you try it with those, let me know if it works or not). <img src=/S/please.gif border=0 alt=please width=31 height=23>

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Just a fun program to use with Access. ((97/2k))

    Hi Drew,

    I just ran your program, and yes, you confused me. Here's what I did, tell me what I did wrong or what I didn't understand:

    1. Open my project, create new form, paste in code, and get hWnd value.
    2. Open your vb executable, paste in hWnd from step 1, click Start Timer.
    3. Went back to my project, closed the new form and opened my dialog form from the project I'm working on.

    Here's what happened: your project created a blank dialog box with Yes No buttons. I clicked yes (don't know why, maybe I'm just trying to be a positive person <img src=/S/tongue.gif border=0 alt=tongue width=15 height=15> ). Then that's it. What should I be doing next?

    FYI, I don't have VB installed on this pc (for many reasons), so I can't look at the source.

    The project sounds cool, anyway <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

  3. #3
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Just a fun program to use with Access. ((97/2k))

    Just a real quick reply to this. I'll give an explain a little later (I'm just heading into work...so I'm a little rushed).

    This program is not going to work for dialog FORMS, only dialog windows. For example, put [What Number do you want?] in the criteria portion of a field in a query. The window that will prompt you with that text, for a response, that's a dialog 'window'. A form is something you can open in Access and change how it looks. A window is something the system generates, that you can't control the format of. (Yes, you can change the icon and title of a MsgBox (which is a dialog window...same with the InputBox...etc.).

  4. #4
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Just a fun program to use with Access. ((97/2k))

    Okay, I finally have a free moment now, so I am going to explain a little quirk I found with Microsoft Access 'form' windows. First of all, I am attaching another VB program (just the .exe). When you run this program, it will show you various information about whatever window your mouse is over. You will notice that even moving the mouse around that VB programs window, you will get different windows showing up. A window for the main window, the text boxes show up as their own windows, the listbox, etc. That is because those controls have their own hWnd value, and can actually be 'treated' as a window. (There are a ton of API calls that let you do all sorts of things to a 'window', you just need to know the hWnd.)

    Now, here's what is quirky with Access. Open a session of Access, and then open a few forms. Each 'form' will show to have a main and a 'sub' window, where the 'sub window' is the content of the form, the main window will be the border/caption. None of the controls show up as their own window.....UNLESS that control becomes the 'active' control. When another control gets control, it now shows up us that 'special' window...with the same hWnd value. This is pretty wierd. At least from a Windows standpoint.

    Anywho, the reason my little mimic program only works on a dialog window (not a form... (other dialog 'windows' would be error messages, Action Query prompts, etc.)), is because my code can't 'tell' what controls are on the form by using the Window API's. I am working on a process for 'detecting' and creating those forms, by using automation.

    Does that all make sense?
    Attached Files Attached Files

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Just a fun program to use with Access. ((97/2k))

    Perfect sense, Drew! and that proggie is pretty neat!

    Great explanation, too. I never realized that that was the difference between working in Access and VB. When I was working in VB it was always such a different platform than Access, but yet the same.

    BTW, I used it both in XP and 2000. I can do it on my 97 machine this weekend if you'd like, but it sounds like you don't need that.

    Are there some particular results you're looking for?

  6. #6
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Just a fun program to use with Access. ((97/2k))

    I was just curious if it works in 2000 and XP, I know it works in 97.

    No real results, this was just a test project, which was later incorporated into a larger project. The larger project let's you run the Access database on one machine, and recieve the 'prompts' on another. That larger project is on hold right now. I was just getting real close to finishing it, when I realized that it didn't handle actual forms. So when I start working on that project again, I will be having it mimic forms too. The real purpose will be to have a Web interface 'instantly' available for an Access db. Though a side 'effect' will be allowing a VB interface too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •