Search results

  1. M

    Correct Documentation

    I find that this is often a problem, especically when you are working as a contractor. One of the biggest problems I've found is that people want the solution as quick as possible, and often try to reduce how much work you do up front (requirements analysis, data modelling etc). If you do this...
  2. M

    looping VB qry?

    You're correct on the reason for the error. that's the reason I wasn't able to test it for you. I'm certainly well out of my depth at times and am often helped by people here, so no probs.
  3. M

    looping VB qry?

    try dao.database. sometimes you need to tell access whether you're using ADO or DOA.
  4. M

    looping VB qry?

    I've inserted a combo box and modified the code for you. Have a look to see if it makes sense. Am limited to only testing it for Chem 1 as that is the only chem that has data in for the starting amnt etc in the new stock tbl
  5. M

    looping VB qry?

    I'd avoid that solution like the plague!!! At the worst change the sub to a function called Name(dim inChemicalID as integer) and delete the dim intchem statement from in the code. Then, call the function from another sub Call Name(1) Call Name(2) This will allow you to reuse the code a lot...
  6. M

    Requery a form on a work station

    How about requerying on a timer?
  7. M

    looping VB qry?

    I'm glad I've stuck to the easy world of banking and finance... I assume the relationship between products and chemicals is a many to many, with an intermidiary table between them? If so, can you not have the combo box pulling through the prodcut names. You could then amend the SQL query to...
  8. M

    looping VB qry?

    Now you're using code, try and stay away from macros - they're the devils work (lol). Am I correct in thinking you want to input the chemical id, agreement etc for each of the chemicals, and then run the update? If so, is this any quicker than doing one and running it, then doing the next? If...
  9. M

    looping VB qry?

    Glad it helped! I'd probably use intChemicalID=me.cmbName... & "WHERE [Chemical ID]=" & intChemicalID & ";" As it makes it easier for people to debug later, but in you could certainly use something similar to you example.
  10. M

    looping VB qry?

    Hi Samon, I've put some code behind the button. I hope it makes things a bit clearer as to what I was trying to explain. It still needs some work as I have hard coded in the chemical id at the moment. HTH
  11. M

    looping VB qry?

    Do you have a form that you've tried this on so that I can look at how your fields etc are set out.
  12. M

    looping VB qry?

    Hiya, I'm afraid I've only got A97 on the site I'm on at the moment. Could you save it down for me please. Cheers
  13. M

    looping VB qry?

    Yep, sounds about right. On the recordset front, your statement is still a bit short set rst=db.openrecordset(strSQL,dbopendynaset) where strSQL is a query code that selects which product you want to update. THink about how you could call the module for each type of product whilst re-using...
  14. M

    looping VB qry?

    Oh the joys of that a Monday bring... !EndAmnt = startamnt + adjustment you need to have me. then the field. At the moment, Access won't know what these fields refer to. With rst - anthing with . is an action on the recordset. Anything with ! will refer to a field in the recordset...
  15. M

    Today's Results

    On the button, try changing the criteria to strCriteria="[datefield]=date()"
  16. M

    looping VB qry?

    Glad it helped a bit. The 'Me.TextboxOnForm' was just a guess at a field you might have had on the form. intAmnt = Me.TextboxOnForm - Me.AmntUsed + Me.StockDelivered would probably refer to existing stock levels-amount used+delivery. Have a look over the weekend and revert if you want...
  17. M

    Date in a Report

    mmm... Can you post a sample as there are too many potential things to list.
  18. M

    Date in a Report

    Hi, Just to check a few things. Do you store two dates for the report? Ie date issued and original date issued? Once you've run the append query, is all the data required stored in the tables correctly, in whcich case we're looking at a query problem, or is this a problem with the append query?
  19. M

    Today's Results

    Try customising this and placing it under the button you use to open to open the report Dim strCriteria As String Dim strDoc As String strDoc = "RptName" strCriteria = "[datefield]="& date DoCmd.OpenReport strDoc, acViewPreview, , strCriteria DoCmd.Maximize This allows you to use the report...
  20. M

    Enable button in a subform when certain form contains it is opened

    Use the on_open command of the main form to specify whether the button is visible or not. me.subformname!buttoname.visible=false
Back
Top Bottom