what i have done, i created an update query, saved it. i created a macro that calls that query then on close of the form i called that macro. so when am closing the form it runs the update query and updates the form. so i have managed to work it out. so thatnks for your ideas
However the challenge is on saving the old information so where, do you have an idea?
Ruth
User Profile
Collapse
-
-
hi, yes my cmd is on the same line, see it below how it appears:
Function my_func()
DoCmd.RunSQL "UPDATE ClRegistry INNER JOIN visit ON ClRegistry .PIDC = visit.PIDC SET ClRegistry .Name = visit.Name;"
End Function
**And i have saved the module too, bt when i put the statement i=my_func() on the onc;ose event procedure, when i close the form the error i told you about appears. However...Leave a comment:
-
in our case it seems to me that you try to use something that we didn't define
my_function() and we have created my_func() haven't we?
Take care about writting of functions!
Yes, you are right, i just made a mistake when typing to you but what i catually is:
(1)in the module
Function my_func()
DoCmd.RunSQL "UPDATE ClRegistry INNER JOIN visit ON ClRegistry .PIDC = visit.PIDC...Leave a comment:
-
Thanks for not getting ties of me but am sure am yet get there:
Yes you say i type it i=my_func() in either onclose or event procedure on a control whichever i wanted. I put that statement "i=my_func( )" and an error message occured that "microsoft office access can't find the macro 'i=my_function( )'
what does taht mean? and where is i coming from; if i is the name of the module or macro developed, i tried...Leave a comment:
-
tHANKS, WHEN I TYPED IT IN THE MODULE AS YOU TOLD & COMPILED IT DIDN'T BRING ANY ERROR, SO IT WILL WORK
HOWEVER, YOU HAVE WRITTEN AS BELOW;
End when you want to start this you have to type in your event code in the forms
i=my_func()
WHERE AM I SUPPOSED TO TYPE THIS, THE "i=my_func( )" IN EVENT PROCEDURE, IS IT ON CLOSE, LET ME KNOW PSE, I GUES AFTER THAT MY VB WILL BE WORKING WELL.Leave a comment:
-
Thanks but where do i put that vb, because when i put it in the module, it complains that "invalid outside procedures"
ThanksLeave a comment:
-
Thanks for the Link but it couldn't help, it's too refering to conditional formating with conditions of that form yet me i want conditions to be got from another form
help if can pse
ThanksLeave a comment:
-
Thanks for your help but am getting an error on what i have tried, gues i tries it wrongly. still clarify
when i checked the sql view, this is what i saw; UPDATE ClRegistry INNER JOIN visit ON ClRegistry .PIDC = visit.PIDC SET ClRegistry .Name = visit.Name;
(Name is the field in both)
So what i did, i followed your example and cut off the orhers and formulated this; DoCmd.RunSQL "UPDATE try SET try.Name =...Leave a comment:
-
automatic filling of records in a form from another table
Hello there,
i have designed a form called visit form, it's record source is called the visit table. In this form i have fields that look exactly like those in the ClRegistry table. So what i want is that while entering the visit form; on entry of the PIDC number the some of the fields that do not change (e.g sex, RegDate, Name) fill automatically from th ClRegitry table.
Thanks -
It's kind of confusing to me, can u be more specific; this is the more details of what i want to; so put the names i am giving u.
my database is "PIDC"
MY table is "visit" and it's form is Visit" (in this form i want to set a criteria for certains that on entry, they are updated in the "ClRegistry " table i.e the table i want to upadate)
ThanksLeave a comment:
-
Thanks it worked. However is there a vb that can do it automatically?Leave a comment:
-
Please help out, have searched for it, couldn't see. need urgent advise.
ThanksLeave a comment:
-
Updating Data In Another Table
Another tragedy for me;
i have a form called visit form whose record source is visit table; this contains some similar fields like the Registry; forexample school; so i would like to know if i enter a value for the field school in the Visit form, how do i update the registry table.
Thanks -
Conditional Formatting
Hi there,
i would like to perform a conditional formatting in my form.
i have a table called CFailure that has variables PIDC & COMMENT; then an Attendance form whose record source is Attendance table. now in the Attendence form there is a field CTel; in this field i would like to put a condition that when the cursor reaches this put, there's a check that checks if COOMENT in the Cfailure table=1 then the colour for CTel...
No activity results to display
Show More
Leave a comment: