Search results

  1. G

    Add record to subform with click of a button when on main form?

    Hi, Is it somehow possible to use a command button on a main form, that when cliked, adds a new record to a specified sub form? I thought I could use the DoCmd.GoToRecord, acForm, [SubFormName], acNewRec to do this, but I get an error message saying that the [SubForm] isn't open? Thanks in...
  2. G

    Pass variable value from closing form

    Hi, I have an unbound form (pop-up) which I want to use as a input form for another form. The users enters data to the pop-up, and when exiting/closing the pop-up, I'd like the value from the pop-up to be available in the form the pop-up was opened from. I know I can use a public variable, but...
  3. G

    Sum column of calculated data on sub form in a module?

    HI Rich! Thanks for your idea, but I'm using a standard module, not a form module, but hey somethings wrong here. If I have already calculated the controls once, and want to use this,then I can't use a form module. If I want the values when the form is closed, I need to do the calculations when...
  4. G

    Sum column of calculated data on sub form in a module?

    Thanks for your reply Chris! I already have a contrpl in the footer of the subform which holds the sum of the column. However - when I try to reference this from the function, the value is not there, it's empty. When I use =Sum([CalculatedFields]) and run the form, the sum has a slight delay...
  5. G

    Sum column of calculated data on sub form in a module?

    Hi, I have a sub form which has a column with calculated data. How do I calculate the sum of a column in a subform in VBA? I need the value for other calculations in a function. Seems meaningless calculating the values in the sub form all over again when I have them in the sub form already...
  6. G

    Enumerate names of 'fields' in recoedset?

    Bob, Found it! When it comes to syntaxes, it's no use 'discussing' it with the machine. You will always loose. :) Here's what I was after: With rst For Each fld In rst.Fields Debug.Print fld.Name Next fld End With See you here and there Bob :) . Have a...
  7. G

    Enumerate names of 'fields' in recoedset?

    Hi Bob! Awesome Code.....as you said it's an overkill for my case. It's probably my mistake here - saying enumerate 'fields' with fields in single quotes. Here's a better explanation from my side (I hope). I was after an easy way to use a For Each.....loop, something like this For Each 'fld'...
  8. G

    Enumerate names of 'fields' in recoedset?

    Hi, How do I enumerate all 'field' names in a recordset? Thanks in advance.
  9. G

    Cacel new record?

    Hi Rich I've tested it on my db, and it still don't work, so I tried it on a simple testdb, and then it works (you have probably forgotten the Cancel=True after the DoCmd line). I have to search in my current event for the form, since there's a lot going on there with sql and function calls...
  10. G

    Cacel new record?

    Hi Rich No, it did not. I did not know of the Undo method, so thanks for bringing that to my attention. In short summary the problem comes down to this: On canceling the insertion of a new record in the BeforeInsertion event - the new record is there on the screen. I manually have to move to...
  11. G

    Cacel new record?

    Cancel new record? I have function that find the last record, looks at the primary key field value and adds 1 to the number. My records get this sequence 1001, 1002, 1003, 1004......... and so on. The user must clicks a button to add a new record. The user is then prompted with a question if he...
  12. G

    Reaching Controls Properties in AllForms Collection?

    Tried it without any luck. Got an 'Type missmatch error'. So I tried to Dim the variable as a control, and it worked to my surprice. So the way I see it - the mainform's subform control has the controls for the subform. So if there's a new subform control - then that one will contain the sub-sub...
  13. G

    Reaching Controls Properties in AllForms Collection?

    Thanks Travis I'm having trouble setting a variable (Dim MyVar As Form?) to the control on the Mainform that's the subform. I get a 'type missmatch error'. How would I set this variable? Thanks for your help. hth Gerhard
  14. G

    Reaching Controls Properties in AllForms Collection?

    Hi Travis Thanks for replying. I've already done that. Problem is that if a form contains subforms, only the mainform exists in the Forms collection. I do think I have to use the AllForms Collection, which has all the forms in a db. If a form aint loaded - I have to load it, and set the...
  15. G

    Reaching Controls Properties in AllForms Collection?

    I would like to set certain properties for forms in a db using VBA. I've been playung around with Forms and AllForms Collection without any desired results. Any help on getting to a db's controls in forms would be appreciated. Thanks in advance.
  16. G

    Detect printout

    Hi all! Does anyone know how a report beeing sent to the printer can be detected? I don't mean the OnPage event or OnPrint, because they happen also when you preview the report, and then you can Cancel the print. I'm trying to count the numbers of times a report has been printed. Thanks in...
  17. G

    Out of Memory

    Just so it's said: The compact was suggested by Rich, and not by me.
  18. G

    Out of Memory

    If you have VBA in your db, you are beeing asked if you want to save them when closing the Visual Basic Editor. If you look under 'Debug' menu you'll find 'Compile'. If this command is greyed out, then it's compiled or you don't have any VBA. The *Compact and Repair' is under Tools ->...
  19. G

    Out of Memory

    Sorry to hear about the lockup, but I've never experienced any troubles importing db's. I read an article somwhere about 'insufficient memory' and one of the remedies was importing. This has something to do with the GDI HEAP which I believe The Doc_Man is refering to with the 'garbage...
  20. G

    Out of Memory

    I had a similar problem, and did the import, and it was OK again. Here's what you do: Create a new database from the template or file menu. After the new database has been created, go to File -> External Data -> Import. A file browser should open, and select the troublesome db. Select all...
Back
Top Bottom