Search results

  1. C

    Calling a Function from VBA Code

    Thanks for the help, I will try it that way.
  2. C

    Calling a Function from VBA Code

    OK, this is driving me nuts. I have a simple function I want to call from a VBA module. Below is the code: Public Sub CGDTest() Dim LowPct As Double, LowDeduct As Double LowPct = 15.9 LowDeduct = CalcLowDeduct(LowPct) End Sub Function CalcLowDeduct(LowPct As Double) LowDeduct...
  3. C

    Can't Update Form Control Using DLookup

    I think I have these errors fixed. I ended up deleting and rebuilding the combo and text boxes for Product ID and Unit Price respectively. I think most of my errors have to do with the fact that I'm tweaking a template someone else built, not to mention my skill level at the beginner level...
  4. C

    Can't Update Form Control Using DLookup

    That column reference starting at 0 rather than 1 doesn't make sense to me, but I supposed mine is not to question Microsoft! Thanks for letting me know about that.
  5. C

    Can't Update Form Control Using DLookup

    Thanks Bob, sorry to be so daft, but is number of columns the same as ColumnCount? I already have that set correctly.
  6. C

    Can't Update Form Control Using DLookup

    I checked on the RowSource query that drives the ProductID combo box. The query is as follows: SELECT DISTINCTROW Products.ProductID, Products.ProductName, Products.PackageSize, Products.WeightLbs, Products.DealerUnitCost, Products.UnitPrice, Products.InStock FROM Products ORDER BY ProductID...
  7. C

    Can't Update Form Control Using DLookup

    OK, now I'm getting an error saying, "You can't assign a value to this object" after changing the statement to Me.UnitPrice = Me.ProductID.Column(6). The ControlSource property shows UnitPrice, which is the name of the text box. Does this need to be changed?
  8. C

    Can't Update Form Control Using DLookup

    This is a dumb question, but how would I reference the rowsource of the combo since it's a select query? Also, the UnitPrice text box doesn't have a rowsource property. I can't get my head around this apparently . . .
  9. C

    Can't Update Form Control Using DLookup

    Thanks so much, I'll give it a go!
  10. C

    Can't Update Form Control Using DLookup

    I've uploaded a database which is giving me trouble. It was a template someone downloaded and asked me to tweak. The form named Order Details Subform has a combo box control named ProductID. (I would have named it cboProductID, but oh well . . . ) Anyhoo, when I run the main form or the...
  11. C

    Running a VBA Module from a Macro

    OK, thanks, I'll try that.
  12. C

    Running a VBA Module from a Macro

    Does it make a difference if my code is a procedure rather than a function? Thanks for the code.
  13. C

    One More Report Filtering Question

    Never mind, I figured it out.
  14. C

    One More Report Filtering Question

    OK, so I added another filter to the reporting sub: DoCmd.OpenReport ("AllSamplesReport"), acViewPreview, , "[pvmt_analysis_section_id] = " & Me.cboSectionNo " and [pvmt_sample_nmbr] = " & Me.cboSampleNo pvmt_analysis_section_id and pvmt_sample_nmbr are integers. I keep getting syntax...
  15. C

    Help with VBA Report Filtering Syntax

    That did it, thanks so much!
  16. C

    Help with VBA Report Filtering Syntax

    I have the following procedure to filter a report. Private Sub cmdCreateReport_Click() ' The section and sample numbers were chosen by the combo boxes DoCmd.OpenReport "SampleReport", acViewPreview, , [pvmt_analysis_section_id] = '& Me.cboSectionNo &' " End Sub The variable...
  17. C

    At Wit's End with Recordset

    DCrake, that was it! The " & j & " was the last missing piece of my puzzle. I didn't find any explanation of that where I searched, so this is good info to have. I appreciate this so much!! Thanks to everyone for your input and helping me solve this.
  18. C

    At Wit's End with Recordset

    Thanks, DCrake, I'll give that a try.
  19. C

    Running a VBA Module from a Macro

    How do you run a VBA module from a macro? I tried the OpenModule action, but all it did was to open the module. I had thought this would run it since OpenQuery runs the query, not just opens it. Any help would be appreciated.
  20. C

    At Wit's End with Recordset

    It's frustrating to me that this should be a simple task. I can do this task in Visual FoxPro in my sleep. Thanks for your help.
Back
Top Bottom