Search results

  1. A

    VB Editor causes an error. And why does a form have a Report in it?

    Hi, I've inherited a database for a company I do support work for, and it has a problem with its database that I don't understand.:( When I copy the day's copy of the database onto my laptop it works fine on my laptop. The problem is, I then do the following: 1. Open the VB editor (Alt+F11)...
  2. A

    Flatten query results into one row

    Hmm, i've cracked it. I can fix it with a Group By on the first two columns, and then selecting MAX values on the results. Isn't it always the way that you bang your head against the wall all day, then spend ages formatting a post to a forum, and THEN you see the answer? :rolleyes:
  3. A

    Flatten query results into one row

    hi, I've got a problem with multiple rows that I want flattened into one row. In the attached database, I've created a simplified version of my problem. The database has two tables, TestItems and Results. In Results, there are four Result columns, representing results of different types of...
  4. A

    Runtime Error 5 in calculation. Driving me crazy

    Hi, I've worked around it now, so it's not a critical problem. BUT, it's the sad kind of thing that'll keep me awake at night! If anyone can answer WHY the simplified sample code I posted above doesn't work when using variables, I'll be a happy man... Andy
  5. A

    Runtime Error 5 in calculation. Driving me crazy

    Ah, that makes sense. I wittled it down and found the following simpler ways to generate the error. Private Sub TestPower() Dim x As Double Dim y As Double Dim res As Double x = -3 y = -0.6 ' this won't work. can't have a negative decimal as the exponent res =...
  6. A

    Runtime Error 5 in calculation. Driving me crazy

    HI, I'm trying to calculate a profit growth in one of my Reports. My function is as follows. Private Function Rate(vStart As Variant, vEnd As Variant, vYears As Variant) Rate = ((vEnd / vStart) ^ (1 / vYears) - 1) End Function When I call it with the following values I get a RunTime error...
  7. A

    Setting parameter in a subform

    Hi, This is my first post... Anyway, I have a form, frmTest, with a subform, frmTestResults. The subform displays the results of a query which has a single parameter, "TestID". Using VBA, I want to open frmTest in response to a button press on another form, using DoCmd.OpenForm, and setting...
Back
Top Bottom