Search results

  1. GolferGuy

    Replace fractional Odds with Decimal

    I'm assuming this is how you are now formatting this: ctl = Format(Eval(ctl) + 1, "0.00")
  2. GolferGuy

    subforms SourceObject

    It's a big app!
  3. GolferGuy

    subforms SourceObject

    If you onlyhave a couple of subforms, YES, by all means. But, in my applications, I have quite a few forms, upwards of 80 in one of my apps. It would take a couple of minutes to open all those forms if they were all in their own subform Controls, but hidden. So, in simple terms, one subform...
  4. GolferGuy

    OnFocus for New Record

    The event you need to use is the OnCurrent event of the main form. As I understand, you want Account_Number to receive focus when you start a new record on the main form. So, the line that rainman89 suggested would go into the OnCurrent event of the main form.
  5. GolferGuy

    Replace fractional Odds with Decimal

    Did you put the =EvalField() into the AfterUpdate property of the field(s) you are dealing with? I'm sorry, I said the afterupdate event, when I meant (in original post) to say property.
  6. GolferGuy

    Replace fractional Odds with Decimal

    My bad, sorry about that. Change it to this:Function EvalField() Dim ctl As Control Set ctl = Screen.ActiveControl ctl = Eval(ctl) + 1 End FunctionI took out all the code that was using x. That code was so I could copy the formula that had been typed into the field into another text box so...
  7. GolferGuy

    Replace fractional Odds with Decimal

    Function EvalField() Dim x As Integer, ctl As Control Set ctl = Screen.ActiveControl x = Val(Mid(ctl.Name, 5)) Screen.ActiveForm.Controls("Formula" & x) = ctl ctl = Eval(ctl) End FunctionOn that last line. ctl = Eval(ctl) + 1
  8. GolferGuy

    Module For Load UnLoad Forms

    Gethzerion, Did my last post work for you? I have no idea why Guus2005 said you should not use Call. I know it is not needed, but I still use it sometimes, but I have never seen anything that said one should not use it. I have also have no idea why someone would say that AllForms should not be...
  9. GolferGuy

    Replace fractional Odds with Decimal

    You can use this function to "Evaluate" the initial division problem of 2 divided by 1 = 2. Because I don't gamble, except to drive the freeways of California, I don't know if after doing this division, you just simply add 1 to the answer, as would be the case in 2/1. Could you give a good...
  10. GolferGuy

    Module For Load UnLoad Forms

    As I said before, you need the form names to be strings, not form objects. I did miss this line though. Forms![FormIn].Visible = TrueThis line is incorrect. Again, when dealing with a collection, and Forms is also a collection, so instead of the syntax above, which is looking for a form...
  11. GolferGuy

    Module For Load UnLoad Forms

    To reference a single object within a collection (AllForms is a collection) you either refer to the index like Allforms(0) or AllForms(1), etc. or you refer to the single object by its name, like AllForms("MyFormName"). The format you have choosen is this second method. A form's name is a...
  12. GolferGuy

    Cannot repeat import from Excel

    I don't know why your temporary table is thougth to still be there, but what I have always done is to actually build the table and leave it there. Then all I need to do is clean it out before I go to use it again. If you want to clean it out (DELETE * FROM MyTable;) at the end, that of course...
  13. GolferGuy

    Totals Row in Datasheet

    If you make the datasheet a subform, the it's parent can have a control in the Form Footer that could give you the total of each column. The ControlSource of the "total" text box would follow this sample.=DSum("Field01", "tblORqryFromRecordSource", "SelectionField=" &...
  14. GolferGuy

    DSN File Required for Linked Table Front-end Access?

    Paul, could you run through the steps to do this please. I am a complete novice when it comes to linking to SQL Server from Access. It works fine on my development machine, but when I take it to production, I really not sure of how, or the "best" way. The only production setup I have worked...
  15. GolferGuy

    subforms SourceObject

    Thanks Bob, Pat is the first person I have heard of that might do this same/similar thing. Actually feels good to not be a loner.:)
  16. GolferGuy

    subforms SourceObject

    Public variables are very handy, but I have found the hidden form to be more useful for me, and here are the reasons, all of which I have found make writting the code for the database easier and more convient. 1. When the program code crashes, and you must Stop the code, you will lose all your...
  17. GolferGuy

    subforms SourceObject

    Massoud, I have been using this method (one subform control, many forms to put into it) for about 11 years now. Works great! In order to pass parameters to a form that is being opened in this one subform control, I have a form, which I call "frmUtility" that I open when the database is opened...
Back
Top Bottom