get data from different form???

  • Thread starter marco_pb via AccessMonster.com
  • Start date
M

marco_pb via AccessMonster.com

Hi,

I have got another problem here.
I want to get data from table A and copy it into table B.
I dont want to use query as i want the user to be able to update data in that
form.

for example:
I want to take A.data1and copy it so that B.data2 has the same value as shown
in A.data1
below is the code i am using..
I create it using modul and I call the function from B.data2 (before update
event)

Function getSchulnote()

Dim a As Double
a = Forms![EGS - Schull Abschluss (Ü/A)]!Durchschnitt_Schulnote.Value
Forms![EGS - Ergebnisse Einstellungstest (Ü/A)]!Notendurchschnitt_Schul.Value
= a

End Function

I have got an error that says, module can not find 'EGS - Schull Abschluss
(Ü/A)' form.

I am a real noob in using access 2003. Thank you in advance for your input,
advice, and help.
 
M

Martin

That error message usually means the form you're referring to is not open -
when you use Forms![name of form]... the form has to be open first. You can
open a form with DoCmd.OpenForm "name of form".
 
M

marco_pb via AccessMonster.com

Martin said:
That error message usually means the form you're referring to is not open -
when you use Forms![name of form]... the form has to be open first. You can
open a form with DoCmd.OpenForm "name of form".

Thank you very much Martin..
It really works and it is that simple. wow..
thank you, I really mean it. thank you
 
M

marco_pb via AccessMonster.com

I am sorry Martin,

I have got an error..
the data that is copied is only the first row data. How can I make it like
below:

formA
test abc
data1 1
data2 2

formB
name xyz test abc
me a data1 (get the value automatically from form A in
after update event of column test)

thank you again in advance for your help..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top