Search results

  1. D

    Solved Order Form Query

    Thanks CJ. That's done it!
  2. D

    Solved Order Form Query

    Thank you. I'm nearly there. The columns in the combobox are SupplierID, SupplierCode, SupplierName, SupplierProductionDays, SupplierDispatchDays. I display columns 2 and 3 in the dropdown box (ignoring column 1 by setting the column width of column 1 to 0 so only the SupplierCode and...
  3. D

    Solved Order Form Query

    I can get the data if I include it as a field in the combobox but how do then utilise it on the form?
  4. D

    Solved Order Form Query

    Hi, I have an order form which uses the tables CustomerT and OrderHeaderT with a subform for the order details. The Order Form has a combo box to select which supplier the order is from and puts the SupplierID (from the SupplierT) nto the OrderHeaderT.Supplier field. This has all been working...
  5. D

    Solved Concatenating addresses on a report

    Thank you all for your help. I did, in the end, create functions, but for anyone who doesn't want to create a function, the reason it failed was because of missing parentheses around the Chr code. The code worked when I put them in as follows: - =[InvoiceAddr1]+(Chr(13) &...
  6. D

    Solved Concatenating addresses on a report

    Thanks. I'll try that tomorrow.
  7. D

    Solved Concatenating addresses on a report

    I'm trying to concatenate address lines on a report so that empty lines don't show up. I've searched the forum and found a thread that recommends doing this: =[InvoiceAddr1]+Chr(13) & Chr(10)+[InvoiceAddr2]+Chr(13) & Chr(10)+[InvoiceAddr3]+Chr(13) & Chr(10)+[InvoiceAddr4]+Chr(13) &...
  8. D

    Record won't delete using db.execute

    Pat, all I have in my BeforeUpdate is a msgbox to show me when it is called. And sometimes it is called and sometimes it isn't and I can see no rhyme or reason as to when it is called. I can do the same action (open the form, then use the Close button to close it straight away) 3 times - once it...
  9. D

    Record won't delete using db.execute

    I understand what you are saying Pat, but how can I process it in the BeforeUpdate event if it never goes into this event?
  10. D

    Record won't delete using db.execute

    OK. I've solved it. The fact that it was sometimes doing the delete and other times not was really doing my head in! I finally put a msgbox in with the errorcode from the dbFailOnError. This came back with a code of 128 (sometimes) so I put the following code in: sqlquery = "DELETE *...
  11. D

    Record won't delete using db.execute

    Thank you all for your replies. To answer some questions: 1. The Currency Type is shown and available for update is because the currency CAN change for a specific order. The Customer's default currency is shown as the default, but that can be changed, and therefore needs to be tied to the order...
  12. D

    Record won't delete using db.execute

    Thank you The_Doc_Man, that makes perfect sense and explains many things. So, I call the form using an argument, which by your logic, effectively fills in the CustomerCode and creates the record. I then bring the Currency Code in for that Customer. I set the default value to "" because the...
  13. D

    Record won't delete using db.execute

    Update: I have copied the NewOrderF form and taken out the subform but it still creates the record on the OrderHeaderT. When I add a new stock item, it goes through the same process of inserting into the StockItemT but the record doesn't show on the table until the record is committed. The only...
  14. D

    Record won't delete using db.execute

    Thanks Minty. I appreciate this BUT the record is inserted immediately the form opens. So even if I do nothing on the form but close out, I need to delete the inserted record. Also, when I add a new stock item using a similar form, this doesn't happen. The only difference I can see is that the...
  15. D

    Record won't delete using db.execute

    Pat, I agree completely with your comments and it frustrates me that the record is being created at all. I want to know why. I put a msgbox into 'BeforeInsert' and stepped through the code. Private Sub Form_Load() Dim CustomerInputID As Variant Me.Currency.Value = " " If...
  16. D

    Record won't delete using db.execute

    Hi, I have a form NewOrderF which is called as follows:- Private Sub NewOrderBtn_Click() On Error GoTo Error_NewOrderBtn_Click Dim CustomerInputID As Variant CustomerInputID = Me.CustomerID DoCmd.OpenForm "NewOrderF", , , , , , CustomerInputID Exit Sub...
  17. D

    Solved Multiple options on one field

    Thank you all, I finally managed to get it working and it was my own silly fault that the querydef wasn't working! In the calling form, I called the OpenForm as follows:- DoCmd.OpenForm "OrdersSelectionF" Me.SupplierParameter.Value = "" Me.SupplierListCombo = ""...
  18. D

    Solved Multiple options on one field

    FileName is the output file defined further up in the code. I know that that part works.
  19. D

    Solved Multiple options on one field

    Adding a me.refresh after the set qdf made no change.
  20. D

    Solved Multiple options on one field

    I've tried to use a querydef but I'm obviously doing something wrong as nothing seems to happen Private Sub Form_Load() Dim StatusString As String Dim fullquery As String Dim qdef As dao.QueryDef Dim db As dao.Database Set db = CurrentDb StatusString =...
Top Bottom