Results 1 to 14 of 14
  1. #1
    2 Star Lounger
    Join Date
    Jun 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pictures in Access 2003 (2003)

    I am trying to make my database where it can get a picture from my webcam and make a record in my table. The info about the picture is entered by the user. I got everything working besides the database getting the picture from the webcam. Any help is appreciated. Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pictures in Access 2003 (2003)

    Storing pictures in an Access table is not a good idea - it causes tremendous bloat. Access stores an uncompressed bitmap image alongside every jpg, so a single 640 by 480 pixel colour image will take up a megabyte or more. The preferred approach is to store the path / filename of pictures in the table, and to use code to display the pictures on a form or report. The database attached to <post#=296892>post 296892</post#> demonstrates how to do this.

  3. #3
    2 Star Lounger
    Join Date
    Jun 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pictures in Access 2003 (2003)

    When the camera takes a picture, it puts it in a directory on the hard drive. Every picture has the same name with the last number incrimented by one. Then I want to have a button to go out and get the picture, but how would I make it where the button will get the next picture. It keeps getting the same picture. Thanks

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pictures in Access 2003 (2003)

    What is the format of the file names? Something like

    File1.jpg
    File2.jpg
    ...
    File99.jpg
    File100.jpg

    or something like

    File0001.jpg
    File0002.jpg
    ...
    File0099.jpg
    File0100.jpg

    or something else?

  5. #5
    2 Star Lounger
    Join Date
    Jun 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pictures in Access 2003 (2003)

    They are

    Picture 1.jpg
    Picture 2.jpg

    and so on...........

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pictures in Access 2003 (2003)

    Say yhat you put the file names into a table tblPictures:

    <table border=1><td align=center>FileName</td><td>Picture 1.jpg</td><td>Picture 2.jpg</td></table>
    The next picture to be retrieved is

    <code>"Picture " & (DMax("CLng(Mid([FileName], InStr([FileName], ' ')+1))", "tblPictures") + 1) & ".jpg"</code>

  7. #7
    2 Star Lounger
    Join Date
    Jun 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pictures in Access 2003 (2003)

    HansV,

    I have another question. I have a field which is an integer. I have a command button that i want to incrimnet this number with. What should I put in the OnClick event area to make it incriment the number in the field? thanks

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pictures in Access 2003 (2003)

    Something like

    Private Sub cmdIncrement_Click()
    Me.txtNumberField = Me.txtNumberField + 1
    End Sub

    where cmdIncrement is the name of the command button and txtNumberField is the name of the text box bound to the number field.

  9. #9
    2 Star Lounger
    Join Date
    Jun 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pictures in Access 2003 (2003)

    Is there any way to have real time video from a webcam in a form? And if there is can you send me in the correct direction. I cant seem to figure this out. Thanks

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pictures in Access 2003 (2003)

    Sorry, I have no experience with that. A quick search didn't turn up anything useful.

  11. #11
    2 Star Lounger
    Join Date
    Jun 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pictures in Access 2003 (2003)

    What does the "Me" stand for or mean in the "Me.txtNumberField = Me.txtNumberField + 1"
    I am new to the VB portion of access if you cant tell.

    Thanks again

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pictures in Access 2003 (2003)

    In the code behind a form or report, Me stands for the active instance of the form/report (the one running the code). The advantage of using is that when you type Me followed by a period, IntelliSense will kick in and present a list of available properties and methods, among which the controls on the form/report. You can select one from the list and press Tab to confirm. This reduces the chance of typing errors.

  13. #13
    2 Star Lounger
    Join Date
    Jun 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pictures in Access 2003 (2003)

    Hans,
    Is there any way to have another program running in an access form. I have a webcam program that only has a preview window. Is there anyway to have that window where it is displayed on the form.
    Thanks

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pictures in Access 2003 (2003)

    As I wrote earlier in this thread, I have no experience with this kind of thing. Perhaps there is a third-party ActiveX control that can do what you want, but I don't know of any, and a quick Google search wasn't promising.

Posting Permissions

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