Close

Results 1 to 5 of 5
  1. #1
    DF VIP Member Andy Poobar's Avatar
    Join Date
    May 2004
    Location
    Toronto
    Posts
    1,013
    Thanks
    0
    Thanked:        0
    Karma Level
    328

    Default Access Database problem - Urgent

    I have an access database that has 1 table in it and 1 form.

    On the form I have a button to duplicate the record which is now duplicating everything on the form.
    The problem I have, is that when I duplicate the record the date/time field to change to the current date/time and not be a duplicate of the last record.

    I have attached a rar file of the database with 1 record in to show how it's bee done.

    Any help will be very greatfully received.

    Many thanks in advance.

    Andy

  2. #2
    DF VIP Member Andy Poobar's Avatar
    Join Date
    May 2004
    Location
    Toronto
    Posts
    1,013
    Thanks
    0
    Thanked:        0
    Karma Level
    328

    Default Re: Access Database problem - Urgent

    Sorry, just read what I need again and missed a bit.

    Also, in the picture part of the database I need to paste whatever is in the clipboard of the computer when I hit duplicate record.

    Any help, please!!

  3. #3
    DF Member keifster's Avatar
    Join Date
    Aug 2006
    Location
    UK
    Posts
    48
    Thanks
    0
    Thanked:        0
    Karma Level
    0

    Default Re: Access Database problem - Urgent

    Sorry - can't see the attachment because apparently I've been a bit of a naughty boy so I will have to go off what you've posted so far....

    Clipboard: Access doesn't give much support for the clipboard object so you might have to use the sendkeys command to send a paste key sequence.
    eg SendKeys "+{INSERT}"
    will send SHIFT+INSERT to the control on the form (same as paste)

    If you post the code which you have behind the duplicate button I will see what else there is to do.

  4. #4
    DF VIP Member Andy Poobar's Avatar
    Join Date
    May 2004
    Location
    Toronto
    Posts
    1,013
    Thanks
    0
    Thanked:        0
    Karma Level
    328

    Default Re: Access Database problem - Urgent

    The code at the back shows nothing about the paste, as this is a new piece of functionality that I want to add.

    The sendkeys sounds like a good road to go down, my only problem, is how do I make sure that what I copy goes into the right bit. ie, the ole object bit??? and not a text box etc.

  5. #5
    DF Member keifster's Avatar
    Join Date
    Aug 2006
    Location
    UK
    Posts
    48
    Thanks
    0
    Thanked:        0
    Karma Level
    0

    Default Re: Access Database problem - Urgent

    Before the SendKeys you should do a setfocus on the control

    eg If you OLE Object control is called Pic then your code will look like this

    Pic.SetFocus
    SendKeys "+{INSERT}"

    I would also put a DoEvents after the Sendkeys command otherwise you may find that your NumLock will be deactivated.

Similar Threads

  1. Floppy problem
    By urbsy in forum PC Problems
    Replies: 8
    Last Post: 7th September 2002, 12:04 AM
  2. F12002 Problem
    By shawtek in forum Microsoft Consoles
    Replies: 9
    Last Post: 31st August 2002, 10:20 AM
  3. Problem with Compaq Armada E500 Laptop
    By Mr Olympia in forum PC Problems
    Replies: 2
    Last Post: 29th August 2002, 02:40 PM
  4. real audio recording problem
    By flypitcher in forum Music Factory
    Replies: 3
    Last Post: 28th August 2002, 11:25 PM

Social Networking Bookmarks

Posting Permissions

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