I add some data in a form by text box. a acsess file store it.then I close this form
and open another form . that data show in this from by datagird or msflexgrid. but my
problem is when I add some data and close that form this data not currently show in datagrid
or msflexgrid. when I close full project and open it again then show all data. how can I
show it currently.

hi. you can close the database after saving then open it again upon loading of the new form.

Please help me with code and event.

check first the state of your recordet. if its open then close it first
then open it again.

If rs.State = adStateOpen Then rs.Close
rs.open"Select * "

I try it many way but I coud'nt. I connect my database with properties of adodc control. and write in recodesource like this code
select * from table1
so please tell me where I write code i mean whice form and what code.
please

any body can help me please

help me with this problem please.

help me with this problem please.

anybody help me

Can u plz post the sample code where u r populating the flexgrid with the records?

I didn't write any code. I put a data control. ms flexgrid connect with data control by properties. like data source = data1
another was datagrid. it also select by properties. i write sql like
select * from table1

Check out the attachment.

thanks dear but not like it. I mean I input a data in a from by text box and then close this form. after close I run a another form where a datagird contained. I want that data show in this datagrid.

please check this. here in form2 I add any data by textbox and addnew button. when I close this form2 I want this new data show in flexgrid (form1) without click refresh button.

Private Sub Command1_Click()
    Form2.Show vbModal
    Call cmdRefresh_Click
End Sub

its not work.

if you don't mind can you modify the attachement

I add some data in a form by text box. a acsess file store it.then I close this form
and open another form . that data show in this from by datagird or msflexgrid. but my
problem is when I add some data and close that form this data not currently show in datagrid
or msflexgrid. when I close full project and open it again then show all data. how can I
show it currently.

well first u can create conection at form load and retrive all data from the database . if u have problem in code then i will explan ok

Ok dear. can you modify my last attachment please. then I can get lot of help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.