Results 1 to 2 of 2

Thread: MS Access VBA code help pretty please.

  1. #1
    NW Area Rep AP2's Avatar
    Join Date
    Dec 2004
    Location
    Don't Ask
    Posts
    1,499
    Rides
    0

    MS Access VBA code help pretty please.

    Is there anyone on the board who knows there way around VBA in MS Access as I don't

    Need a little help with deleting some records in my main table [TransVu_Data]

    The table contains lots of multiples of the same vehicle details and what I want to do is delete every occurrence of a vehicle from the database, I have a Form with a drop down box (Delete_List) which uses a query (Find Latest Data) which produces a look up list of all the vehicles within the TransVu_Data table. I want to be able to select a vehicle from my drop down box and then use a separate button (Deletebutton) to delete every occurrence from within the TransVu_Data table that matches the selected vehicle. Field name for the selected vehicle in the table is [System Name].

    Ideally when the button is pressed the user would be greeted with are you sure you want to delete vehicle XXXXXX.

    I have a delete query (Delete_Vehicle) which works when I pass it [Vehicle ID] is it possible to call this query from VBA and pass it the selection from (Delete_List) on the press of (Deletebutton) if that makes sense

    Cheers in advance for any help

  2. #2
    NW Area Rep AP2's Avatar
    Join Date
    Dec 2004
    Location
    Don't Ask
    Posts
    1,499
    Rides
    0
    Now Sorted thanks to lots of googling and a bit of hit and miss

Posting Permissions

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