473,378 Members | 1,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

update from another form

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
1 1536
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sue Adams | last post by:
I actually have two issues/questions: I have an autonumber field in an access db table that I grab and later use to update a record in another table withing the same db. The code I use to get...
3
by: Vinay | last post by:
Hello I am trying to update a Progress bar on a form. I am able to update it via using a simple clock timer, but as soon as I perform a long operation G1 (generation of a report) in a separate...
1
by: Mark Reed | last post by:
Hi All, I'm having a problem with the following code. I've read quite a lot of old posts regarding the issue but none seem to affer a solution. The scenario is. I have a bound form which...
5
by: Stephen Plotnick | last post by:
I'm very new to VB.NET 2003 Here is what I have accomplished: MainSelectForm - Selects an item In a public class I pass a DataViewRow to ItemInformation1 Form ItemInformation2 Form
4
by: Amarantine | last post by:
I have a from and a subform and I need to stay on the same record when I move from the main form to the subform. I have a "next" button with a macro on the last page of the form which navigates to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.