Search results

  1. G

    More Forms or More VBA

    Hi all, Thanks for the answers. This wasn`t really a specific question as such, I was just wondering what the experts prefer to use. the orders example above was just an example of a business process. From the answers I am guessing that if that more code is the way to go if it is all part of...
  2. G

    More Forms or More VBA

    Hi all, I have a form that I use for all my sales side orders (Quotes, Orders, Invoices etc), I use vba code to setup the form when it opens and also set the subform to use depending on the type of order. My question is - Is it better to create different forms for each order or use vba code...
  3. G

    VBA SQL Insert changing 2 fields

    Hi Gina, Got it all working. What you gave me was correct, not sure why I was throwing an error to start with but when I removed the code then reinserted it after restarting access it worked. Many thank for all your help Gareth
  4. G

    VBA SQL Insert changing 2 fields

    Hi Gina, Basically what I am trying to do is to copy all the fields from a record in TblOrderDetails where the OrderHeaderID is what is in the WHERE clause. Then I want to Insert the record back into TblOrderDetails as a new record but to give it a new OrderHeaderID that is set as lngID and...
  5. G

    VBA SQL Insert changing 2 fields

    Hi Gina, Thanks for the help so far. This is selecting records from TblOrderDetails with OrderHeaderID =lngID and OrderTypeID = NewOrderTypeID. I actually want to set the OrderHeaderID and OrderTypeID fields to the lngID and NewOrderTypeID values when inserting them into the table. The...
  6. G

    VBA SQL Insert changing 2 fields

    Hi Gina, I put this in so I could make sure the correct values were where they should be while I`m trying to get it to work. The immediate window shows as below INSERT INTO [TblOrderDetails] (OrderDetailsID, OrderHeaderID, OrderTypeID, ProductID, Discount, Quantity...
  7. G

    VBA SQL Insert changing 2 fields

    Hi all, I have been trying to get an SQL Insert statement to duplicate a form and subform but changing two fields in one of the tables. I got the following code from allen browne`s site (Can`t post link as first post with this username) after searching around. Private Sub BtnOrder_Click()...
Back
Top Bottom