By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,741 Members | 2,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,741 IT Pros & Developers. It's quick & easy.

update from another form

P: n/a
Why i cannot update from another form? I have an update function
called UpdateData that works otherwise,but not from another form.
Why is it so?
I am trying to update tables from the form F1.There i have the
following code :

DoCmd.OpenForm " F2"
UpdateData
I have also applied the OnOpen function, and in my UpdateData function
i also have the following condition:

Dim strDocName As String
strDocName = "F2"
If IsOpen(strDocName) = True Then
......
end if

Obviously it is not enough.
Can somebody help me ?

The reason why i must use two forms is rather complicaed but i think
it is not relevant to my question
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Primerov <pr******@hotmail.com> wrote:
Why i cannot update from another form? I have an update function
called UpdateData that works otherwise,but not from another form.
Why is it so?
I am trying to update tables from the form F1.There i have the
following code : DoCmd.OpenForm " F2"
UpdateData


You have to reference the function in the other form's module correctly.
If you just use 'UpdateData', Access searches for a function of that
name in the current form and in the public functios in modules. If you
use 'Form_F2.UpdateData', Access knows where to find UpdateData.

HTH,
Chris

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.