|
-
Sep 7th, 2004, 05:51 AM
#1
Thread Starter
Addicted Member
Loading a form (HELP! ITS URGENT)
Hi
This might be too basic
i have two mdi childs: frm1 and frm2.
both get their data from the same table in ms sql. i first load frm1 and then frm2. when frm2 unloads i want the changes made in it to be shown in frm1.
load frm1 in the unload event of frm2 gives error. i have no clue how to do this.
i have also tried refresh but the changes don't get updated.
thanks in anticipation.....
-
Sep 7th, 2004, 06:01 AM
#2
Hyperactive Member
Refresh your recordset in form GotFocus Event check it.
-
Sep 7th, 2004, 06:03 AM
#3
to load new data u have to call Recordset.Requery method of frm1 on frm2 unload.
this is what i can say without viewing code. If u can post ur code that will easy to find exact problem & solution.
-
Sep 7th, 2004, 06:16 AM
#4
Thread Starter
Addicted Member
i tried requery too.
it works fine when the command type is a table. but when i use a stored procedure requery too gives an error.
to show u the code i'll have to show the whole app.
btw, frm1 has a datagrid populated by the sp n i want the fields in the datagrid refreshed
-
Sep 7th, 2004, 06:19 AM
#5
let me guess
error should be 'Operation not allowed when the object is open' or something like that.
-
Sep 7th, 2004, 06:28 AM
#6
Thread Starter
Addicted Member
it doesn't stop or give an error on the refresh query but there are no changes made. if u click on that record again u get a eof or bof error. the datagrid is not refreshed on load, refresh (or form or grid) requery
-
Sep 7th, 2004, 06:35 AM
#7
r u sure u r refreshing recordset which is bound to datagrid.
-
Sep 7th, 2004, 06:45 AM
#8
Thread Starter
Addicted Member
as i said my command type is a stored proc.
the command is given in a DataEnvironment
so i have tried :
DataEnvironment1.rscmdApproved.Requery
(.refresh is not an option with the recordset)
but i get the error
"no value given for one or more required parameters"
the sp has no in/out param. it is a simple select query
(but i cannot use the table as a command type)
any ideas.......
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|