Search results

  1. A

    Doubling Records on New Page

    Hi Folks I have an application that queries data from the Sage Accounts Program and then produces Invoices based on that data. My report has a Page Header and Footer and pulls info from one query which gives the Main Product Details and another query which gives only the Carriage detail. Both...
  2. A

    Passing parameters to a query again

    Thanks folks
  3. A

    Passing parameters to a query again

    Yeah I did try that, Pat. Thanks for the thought. I also changed the the parameter to "StockCat" and "Carriage" in case it was getting confused with the available records but I still get the same error. I'll go and try and look back at the help files on all the key words and see if I can find...
  4. A

    Passing parameters to a query again

    ???? I'm obviously being incredibly stupid. Having asked twice about passing parameters using VBA I've now spent a couple of days (yes lterally!) trying to figure out where I'm going wrong. I've used Pat's (thanks Pat) example religiously and also gone back to a previous reply using the...
  5. A

    Passing parameters to a query again

    Hi I've attached a little code... "qryDespatch" has a parameter "p1". When I run this code I get an error which is a data type conversion error - runtime error 3421 so the parameter is expected as a different type. However the query is fine when I run it based on the form so I'm obviously...
  6. A

    Null fields and shrinking text boxes

    Still puzzled... Thanks Rich and DBL. First; DBL; nothing else on the lne thought of that one! Just the text box. Rich; the text box takes a field from a query. text field which may or may not be filled in. If the field has nothing in it then the expression is iif([myField]=null, null...
  7. A

    Null fields and shrinking text boxes

    Hi I have a text box on a report tyhat has the can grow and can shrink properties set to Yes. I thought that by making sure that the expression in the box resulted in Null then the text box height would shrink to zero. Is this not the case? Andy
  8. A

    Passing criteria to a query

    Thanks Raskew & Pat Thanks for these. I took a while to read them as I worked around it in the meantime by creating a copy of the query each with a different parameter. But, trying to normalise everything, I'll go back and use these. Thanks again Andy
  9. A

    Passing criteria to a query

    Is it possible to pass criteria to a query? I have two forms which extract different data from the same query. The query needs to have criteria from whichever form is open. If I use the "OR" field int he criteria then I'm asked for the paramatere from the form which is NOT currently open so I...
  10. A

    Refer to a table using VBA

    Hi Doc Yeah it does make sense...although I've just read it about 8 times, referred to the code above and printed it out! I THINK I see what you are saying...I don't code in other languages I'm afraid (good grief I'm only just getting through this one!) but I can see what you're saying and...
  11. A

    "Type Mismatch" re recordset

    Thanks Pat. Yeah, I am using 2000 so I will do that, thanks. Cancel Update was supposed to be "switching off" the update. Can't remember which of the (many) books I got it from but it suggested using CancelUpdate so that you didn't automatically save the next record when you switched to it...
  12. A

    "Type Mismatch" re recordset

    Thanks Sohaila I did wonder about that...in fact in the meantime I went back to look at the declaration...as the Vb errored out on the line that contained it. So I took away the declaration "dim rstSpPrice as recordset" and replaced rstSpPrice with an undeclared "fred"...and it works!! I just...
  13. A

    a field value to default for next record

    Hi If the date will always be the current date then could you not set the default value to "=NOW()"? If not then it sounds like what you are asking is for Access to hang on to your date after you've closed or updated your form so that the next form can grab it. If so maybe you could play with...
  14. A

    "Type Mismatch" re recordset

    Hi I have the following code attached to a command button. When I run it the code errors out to a "Type Mismatch" error box generated by Access. I've checked the properties and methods but the highlighted line is the one starting "Set rstSpPrice..." Private Sub cmdWriteSpPrice_Click() Dim...
  15. A

    Filtered Combobox in Continuous form

    Jonnie...someone will come up with a more straightforward idea but thi smay help a little(!!)...use the value of the Department box as the criteria for your query...so that, as the value of the Dept combo changes so the Employee combo will only list the Employees relating to that record. So, in...
  16. A

    Refer to a table using VBA

    Thanks...Rich & Doc Searching back on "recordset" I found an example that Rich wrote in Feb '02 (thanks!). This use Currentdb()...I'm a little puzzled that I couldn't find it referenced within the recordset help in access but, hey, glad it's done. Thanks for your time...the posts are really...
  17. A

    Refer to a table using VBA

    Doc Don't know if you will get to read this but can anyone help? Doc gave me an explanation re referring to a table using VBA...tat helped to clarify things a little more. I tried out the example using Northwinds.mdb, came up with a "funtion undefined" error, read up on that and then loaded...
  18. A

    Refer to a table using VBA

    Thanks for the explanation Doc. I did read it this morning but was set on the idea that it was Creating rather than Opening so just assumed the "flavours" were non-relevant (for what I wanted) additions. Many thanks...esp for The Matrix idea...the scene in the restaurant...I may not really be...
  19. A

    Refer to a table using VBA

    Anyone know how I refer to a table using VBA? There doesn't seem to be a Tables collection and OpenRecordset creates a recordset I believe. What I'm actually doing is trying to refer to a table so that I can write records to it from a from. The form records are partially generated from...
  20. A

    Format for fields in Update To

    Having just found some more help I think it may be that my tables in the original query are ODBC linked with no unique index. I wonder if there is a way around this?
Top Bottom