Search results

  1. G

    Align text in ActiveX control or some way of doing it

    Just working on getting my tree view form (thanks MajP !) populated with data. I have the text column and a debit and credit column. How can I get them to line up ? I see that the tree view window is an ActiveX control so I don't know if there are any formatting options. I suppose I could go...
  2. G

    Percent Data Type Issue

    I had this issue. I dealt with it by setting the data type to Currency, decimals Auto, on an unbound field. If the user enters 12.75 I set the table value to 12.75/100 so it becomes .1275 Then I have a string function which sets the text field, it's (table value * 100) then add "%". So 12.75...
  3. G

    SetFocus and Form Footer

    Thank you, I think I'll probably rework my forms so I don't have to jump into the footer section
  4. G

    SetFocus and Form Footer

    I put my form command buttons in the footer and I'm thinking it may be a design mistake. I like to set my forms up for fast data throughput. So I put a SetFocus in the exit event of the last field to jump to the Save and Close button, user just presses return and all is done. Form footer...
  5. G

    Refer to calculated field on Subform from Main form

    I haven't looked at the DB and I haven't studied the discussion since I last posted. But I wanted to point out, I've had quite a few issues relying on sub form footer totals. The issue is that the totals don't update in time whilst Access is continuing to process more code. In more than one...
  6. G

    Refer to calculated field on Subform from Main form

    Answered in post #15 I think. Current Event of main form does not fire when you edit sub form records. You don't need any more debugging than putting a msgbox in main form Current Event, see if it pops up when you change sub form value. Your if..then gets called on first load of your Purchase...
  7. G

    Refer to calculated field on Subform from Main form

    You say your evaluation code for enabling the button is in Current Event of the main form. It's only getting evaluated once. Pop a MsgBox within the lines of your evaluation code and see how often it fires. You also say tglReceiveAll is on the main form. The field on the main form with data...
  8. G

    Refer to calculated field on Subform from Main form

    Have I missed something or is your logic the wrong way round ? You're disabling it when the value is 0. I would write it like this: Me.tglReceiveAll.Enabled = (Forms("Purchase Orders").[Purchase Order Subform].Form.SumItemsReceived.Value = 0) If your main form is for the one record that is...
  9. G

    Sub Query, Inconsistent Results

    The problem was the syntax of the sub query but I don't know why. Here's the sub query that sometimes returns garbage: SELECT tblTransLines.tlTransHeaderFK, Sum(Nz([tlNetValue],0)+Nz([tlVatValue],0)) AS qGrossValue FROM tblTransLines WHERE (((tblTransLines.tlLineType)=0)) GROUP BY...
  10. G

    Sub Query, Inconsistent Results

    What is going on with this query to give me these results? The problem column is AcBalance which is giving me garbage or sometimes the right result. Of 130 records I get c.40 with the right result. The sub query qry_gross_value_total when run in isolation give me a correct result with all rows...
  11. G

    Can I Cover Controls on a Form with a Rectangle/Image/Something Else ?

    You can put a tab control on the form without the actual tabs and format it without borders etc so there's no indication it's actually there. Put different controls on each tab page. Then set whichever tab page you want to be visible, all the controls will become visible.
  12. G

    Error 2585: Closing a form from within a Sub

    Bob, I like that solution. I was fixated on Closing the form from the Sub and it didn't occur to me to just SetFocus out of the field. OK, it's an extra click and the user *could* go back to the form and try to save with no Account key but form BeforeUpdate is going to stop them, and why...
  13. G

    Error 2585: Closing a form from within a Sub

    Thanks for that Bob, but it didn't stop me from keying through a blank field. The form has been working sort of satisfactorily for a while. But what happens (and it will happen in production use), user opens the form to enter a new document, cursor lands in first field. First field is coded...
  14. G

    Error 2585: Closing a form from within a Sub

    Hi DocMan The issue isn't with a 'lack' of firing of the Exit event, it fires every time, if I used the BeforeUpdate event it fires only when the data changes. The field is empty on first open of a form with a new record. I want it to be *not* empty, BeforeUpdate wouldn't fire if we key...
  15. G

    Error 2585: Closing a form from within a Sub

    Thanks June7. bCredit isn't relevant, it just determines what type of Account record to lookup. LookupAccount does return values. It returns the values of txtCustSuppRef, lngCustSuppID, Cancel. It's a search routine across several fields. If I enter a partial Account, key, partial name, or...
  16. G

    Error 2585: Closing a form from within a Sub

    Exit sub of Account key field (LookupAccount is a generic search routine): Private Sub txtCustSuppRef_Exit(Cancel As Integer) ' txtCustSuppRef: text box in which we search for CustSuppRef ' lngCustSuppID: module variable to hold CustSuppID / thCustSuppFK ' is set to 0 if new...
  17. G

    Error 2585: Closing a form from within a Sub

    BeforeUpdate of the control doesn't fire, because nothing changed. It started out empty, and I haven't keyed anything in. I have validation in BeforeUpdate of the form for other stuff. I open the form for a new record, and change my mind. I want it closed, gone, unconditionally. No saving...
  18. G

    Error 2585: Closing a form from within a Sub

    Is there a way to close a form from within a sub that has a Cancel parameter? I want to Close a form within the Exit event of a textbox. I get Error 2585, This action can't be carried out while processing a form or report event. I'm trying to close with DoCmd.Close acForm, Me.Name I don't...
  19. G

    Unexpected Form_Undo event

    DbGuy, now you've explained it like that it makes perfect sense. Actually Pat explained this to me over 2 years ago and I'd completely forgotten, I keep putting the project away and returning to it. Maybe lockdown will focus my mind a bit. Micron, as far as I understand it, Me.Undo is the...
  20. G

    Unexpected Form_Undo event

    OK thank you. So you're saying it's by design, then, if it's not a bug. I did change my save code to Me.Dirty = false (per my link above) and it still discards the edits.
Back
Top Bottom