Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Unanswered: Error when entering Pictures

    Hi all I have a table called Pictures_tbl that has a one to many relationship with a parent table called People_tbl. Every time I enter a picture into the form where the Pictures_tbl is I get this error message. Can anyone help.


    This error can occur if the data you are attempting to save is saving to a Microsoft SQL Server 7.0 or earlier database and the RecordSource for the subform is using an SQL select statement with fields pulled directly from the source table, and the table is using an Identity field set as its primary key.
    To avoid this problem set the RecordSource property of the subform to a table or a query.
    -Or-
    Upgrade to a newer version of Microsoft SQL Server.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I never store pictures in a database, only links to picture files; I find it much more efficient.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    The pictures are stored in a sql table. Its an ADP.

  4. #4
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    I was thinking of having the Pictures in the subform, but as the database grows that might not be agood idea

  5. #5
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    are you us use a hyperlink??

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    If I'm working with a 100 or so "employee" pictures, I'll create the OLE object field in the table and store the pics in that field. Otherwise I'll save the folder/filename in a field to link to the picture. - which might utilize the "shell" command in the vba code for the button to open that record's picture (and thus open the picture in the default picture editing program - ie. usually mspaint.) You can also try it as a hyperlink. Not sure on how that will work.

    Are you sure your table has an identity field (or autonumber)? I'm a little confused on if you're using SQL Server or MSAccess tables.

    If using SQL Server tables (and it's version 7.0), make sure you have the identity field setup correctly (ie. increments by 1). It can or possibly should be the primary key. Later versions of SQL Server corrected the problem of identity fields not setup (and memo/ole field type issues) by creating a field type called TimeStamp.)
    Last edited by pkstormy; 09-19-09 at 03:19.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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