Search results

  1. SteveSchapel

    minus discount on invoice

    Gareth, I think Bob has put his finger on the problem here. If you see 5% then the actual value of the field is 0.05 Therefore, try it like this: = [txtretail] * [Quantity] * (1 - [discount])
  2. SteveSchapel

    VBA Code to Append a Record not working

    Lovely, Bill. :)
  3. SteveSchapel

    minus discount on invoice

    Gareth, Try it like this: = [txtretail] * [Quantity] * (1 - [discount]/100)
  4. SteveSchapel

    VBA Code to Append a Record not working

    By the way, Bill, since we are fine-tuning here, there is another line in your code that caught my eye: Dim stDocName, stLinkCriteria, strLoanMessage, strAppMessage, strReason, strSQL, strUserID As String Do you realise that this will dimension strUserID as a String variable, and all the...
  5. SteveSchapel

    VBA Code to Append a Record not working

    Bill, Great to hear that you have got it sorted now. :)
  6. SteveSchapel

    Between Two Dates

    Kadara, Yep. The CLng approach would also work fine. Whatever feels best to you.
  7. SteveSchapel

    Delete query not working in Macro

    David, If "Delete Record" is indeed the valid name of an existing query that is supposed to delete the required record, then the code you have should work. If it doesn't, you may need to more fully explain what "to no avail" means.
  8. SteveSchapel

    VBA Code to Append a Record not working

    LOL! Presentation is everything! ;) Actually, Bill, at one stage back in the thread, one of the problems was that you missed out the required space between the & and the _ line continuation character. Put it down to a scratch on the screen if you want to, but ...
  9. SteveSchapel

    Between Two Dates

    Here's another way you will often see it done: " ... WHERE Batch_Date Between #" & Format(Me.DTPicker1, "mm\/dd\/yyyy") & "# And #" & Format(Me.DTPicker2, "mm\/dd\/yyyy") & "#"
  10. SteveSchapel

    Between Two Dates

    Kadara, Here's how I normally do it: " ... WHERE Batch_Date Between " & CLng(Me.DTPicker1) & " And " & CLng(Me.DTPicker2)
  11. SteveSchapel

    using requery

    Mcalex, Well, it's actually the Record Source property of the form, not Control Source. And if you are assigning the Record Source in code, then it's a bound form at that point. :) Can you try entering a Record Source in the design of the form, just in the meantime, and see if that eliminates...
  12. SteveSchapel

    using requery

    Mcalex, I am not familiar with the 'Can't build a link between unbound forms' error. I know the subform is not unbound. Is the main form unbound? If so, and if that is causing Access to object, then I confess I was not aware of this restriction - I guess it is very unusual to have an...
  13. SteveSchapel

    VBA Code to Append a Record not working

    Bill, I think the syntax should be like this: strSQL = "INSERT INTO tblLoanAppComm ( LoanAppID, CommNotes, Operator )" & _ " VALUES ( '" & AID & "', '" & strAppMessage & "', '" & strUserRole & "' )" This assumes AID is text.
  14. SteveSchapel

    Between Two Dates

    Kadara, I am assuming your hard-coding of specific dates into your code was done as part of a testing process, and that in practice you will be more likely to be using variables, or date values from controls on a form, or such like?
  15. SteveSchapel

    using requery

    Mcalex, I don't kinow what this getBookId function does. But I can suggest an easier way. On the main form, put an unbound textbox, and set its Control Source to the equivalent of this: =[Subform1]![BookId] Let's suppose yu name this textbox BookRef. Then, look at the Properties of...
  16. SteveSchapel

    VBA Code to Append a Record not working

    Bill, What does "SELECT AID" mean? If you mean this to be a SELECT clause, then I think you are going to need a FROM clause? Or else where does the value of AID come from? Otherwise, if the value of AID comes from for example the value of a control on a form, then you are going to need to...
  17. SteveSchapel

    Between Two Dates

    Kadara, VBA interprets dates as being in US format, unless it is made obvious that another format is applicable. I think your code works, for example, if you change it to: sql = "SELECT Batch FROM Batch WHERE Batch_Date Between #01-Jul-2010# AND #05-Jul-2010#"
  18. SteveSchapel

    Forcing a Stopping point in a text field.

    No worries, Linq. That's not toe-stepping! :) Never hurts to have the same information presented in 2 different styles. :)
  19. SteveSchapel

    Multiple combo box in continuous form.

    Drpkrupa, Remove the Requery code, and also remove the WHERE clause from the 2nd combobox's Row Source query. On the Enter event of the defect code combobox, enter code like this: Me.cmbDefCode.RowSource = "SELECT blabla FROM YourTable WHERE DefType = " & Me.cmbDefectType ... and then on...
  20. SteveSchapel

    Forcing a Stopping point in a text field.

    Mac, Three ideas... 1. Set the character limit to the practical limit if there are an exceptionally large number of wide characters typed (you would have to experiment to figure this out). 2. Use a fixed-width font. 3. Check out the following, and see if either can be applied to your...
Back
Top Bottom