Hey I would just like to know what code would pass the text from frmZoom to fsubCaseDetails on clicking the "Save" button of frmZoom and after doing it ,the form should exit.
My code is not passing the value and not closing the form as well.
Hey, if you'd responded to post #9 then I'd have known the exact situation we're dealing with. If you leave me guessing instead of responding clearly, you can expect me to be unclear as to exactly what IS going on.
Even after your less than polite reply, you STILL haven't answered half the questions posed of you and your situation is STILL unclear.
Ya the code is showing the following error:
Access cann't find the field fsubCaseDetails reffered to in your expression.
You're telling us this in post #13!! Have you given ANY consideration to this question? I suggest if you want some help, you pay more attention to those trying to help you, rather than showing attitude when they can't read your mind.
Ya the code is showing the following error:
Access cann't find the field fsubCaseDetails reffered to in your expression.
This is very confusing as the code you posted earlier (post #8) is quite different from the code you subsequently posted (post #15 - lines #19 to #21). There is also no indication as to which line triggers the error message shown.
The code you have is kludgy and unreasonably complicated.
Since the question was several times asked on the forum I've written a simple howto concerning different approaches to the problem.
The code in #8 is showing the error which is my TO BE code as per my requirement.
All other subsequent codes are for the existing scenario.
My requirement is to enhance the existing scenario and what I have explained in #13 is the existing scenario.
The code in #8 is showing the error which is my TO BE code as per my requirement.
All other subsequent codes are for the existing scenario.
My requirement is to enhance the existing scenario and what I have explained in #13 is the existing scenario.
Bibek,
As Fish has already posted a fairly comprehensive article on the subject I will assume all your questions are resolved for now. I will content myself with a comment I was leading up to before, depending on one of the answers I was anticipating :
Sometimes, code can be inactive (remain untriggered) even if the code is perfectly correctly done, simply because the property of the object (I'm referring to the On Click of a Command Button for example or the On Open of the form itself even) is not set to the value "[Event Procedure]". This is found when looking at the object in Design View and showing the Properties (Alt-Enter).
If you find, after going through Fish's article that you still have questions then please come back and post them.
The approach looks good.Thanks for this.
But I have the following questions:
1) I am always getting a debugging error when am trying to refer a subform in the main form.
for exp
With Forms!frmChild1
.txb.ControlSou rce = Me!fsubCaseDeta ils.Form!txb.Co ntrolSource
2) To overcome this I kept the "Add Comments" button in the subform itself and tried with the same code as posted
With Forms!frmChild1
.txb.ControlSou rce = Me.txb.ControlS ource
It was working fine but this always update the first record in the form,the control is not moving to the 2nd record.
So how to move the control to 2nd record once the 1st record has been saved?
....
It was working fine but this always update the first record in the form,the control is not moving to the 2nd record.
So how to move the control to 2nd record once the 1st record has been saved?
As soon as both forms are bound to the same Recordset object, they will be always pointed to the same record.
I mean to sat how to point to the 2nd record of the form once the 1st record is saved.Suppose I want to enter something to the 2nd record then how to do that?
As I've already said both main and child form being bound to the same Recordset object are pointed to the same record, no matter where do you click navigation buttons.
Option 1. (as in the example)
Select appropriate record on main form, open child form, alter data and either submit or cancel input.
Option 2.
Add navigation bar to the child form. When child form is opened you may use its navigation bar to walk through records.
I am sorry but I am really not getting help for my requirement which is as follows:
As many number of times the child form will be populated with some text and clicked on "Submit" button that many number number of records would be created in the parent form.
i.e First text entered to the child form would make up the first record in the parent form,second would make up the 2nd record and so on.
Comment