using ado

R

ravindar thati

sorry if this question is already anserwed in this forum


i am using ms access as database and the entire aplication forms are
in the same mdb file.
now i had a tough time.
i have a table with 3 fields.
i want to display the table in form using data grid and a ADO control
using vb code.
it should also enable us to edit delete and create new records.
how can i do this?
can any body help me?
thanq
 
G

Graham R Seach

Ravindar,

Access already has a native data grid, called a datasheet. Is there a
specific reason wy you want to use a datagrid and why do you want to use
ADO. In other words, what are you really trying to do?

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
R

ravindar thati

Ravindar,

Access already has a native data grid, called a datasheet. Is there a
specific reason wy you want to use a datagrid and why do you want to use
ADO. In other words, what are you really trying to do?

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia







- Show quoted text -

thanq graham for your reply.

indeed i dont know how to use datasheet and even how to locate a data
sheet.
can you please please please explain me in detail the solution for my
requirement. i am not specific to use datagrid and ADO. i just want to
display the table in a form so that the user should be able to edit,
delete, insert the data.
 
R

ravindar thati

Ravindar,

Access already has a native data grid, called a datasheet. Is there a
specific reason wy you want to use a datagrid and why do you want to use
ADO. In other words, what are you really trying to do?

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia







- Show quoted text -

i am very new to ms access.
yes i searched for that data sheet. but through it, user is not able
to update the changes made to table , and he is also not able to
insert new record. is'nt it?

my requirement is to allow user to update, insert, and delete the
records vai form.
is there any solution.

my frnd please help me
 
G

Graham R Seach

Ravindar,

It's much easier than you think, but I'm assuming you're using Access 2003
or earlier.

1. Create a form, and from the View menu, select Properties. The Properties
dialog is displayed.
2. Select the Format tab.
3. Set the following properties:
Allow Form View = No
Allow Datasheet View = Yes
Allow PivotTable View = No
Allow PivotChart View = No
4. Select the Data tab.
5. Set the Record Source as appropriate.
6. Add whatever controls you like, and set their data binding properties as
appropriate. I'm assuming you know how to do that. If not, say so and I'll
step you through it. Don't bother aligning the controls or placing them at
any certain point on the form.

That's pretty much it! Open the form, and it will appear as a datasheet.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
R

ravindar thati

Ravindar,

It's much easier than you think, but I'm assuming you're using Access 2003
or earlier.

1. Create a form, and from the View menu, select Properties. The Properties
dialog is displayed.
2. Select the Format tab.
3. Set the following properties:
Allow Form View = No
Allow Datasheet View = Yes
Allow PivotTable View = No
Allow PivotChart View = No
4. Select the Data tab.
5. Set the Record Source as appropriate.
6. Add whatever controls you like, and set their data binding properties as
appropriate. I'm assuming you know how to do that. If not, say so and I'll
step you through it. Don't bother aligning the controls or placing them at
any certain point on the form.

That's pretty much it! Open the form, and it will appear as a datasheet.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia









- Show quoted text -

thanq very much frnd. i got it.

but i have one more doubt.
if you use controls like text box, we can view the records one at a
time.
but i want to view all the records at a time.
what is the control the better suits my requirement.


many many thanks again. you have cleared my doubts
 
R

ravindar thati

thanq very much frnd. i got it.

but i have one more doubt.
if you use controls like text box, we can view the records one at a
time.
but i want to view all the records at a time.
what is the control the better suits my requirement.

many many thanks again. you have cleared my doubts- Hide quoted text -

- Show quoted text -

i mean i want to view the entire records in a single control like data
grid or any thing like it, so that i can view every column and row at
a time.
is it possible?
 
R

ravindar thati

i mean i want to view the entire records in a single control like data
grid or any thing like it, so that i can view every column and row at
a time.
is it possible?- Hide quoted text -

- Show quoted text -

i want to view all the records at a time. but it doesnt matter that it
should be a single control.
if we use a text box for each field of the table, then we can only
view one record at a time.
i hope you got me.
but i want to will all the records at a time, so that we should be
able to update, insert new record, and delete the record.

how can i do this?
please dont think other wise if i am asking basic or silly questions.
i am new to ms access.

thanq
 
G

Graham R Seach

Ravindar,

I don't think you quite understand what I mean, and I don't think you've
tried it yet.

If you have 5 fields you want to show, add 5 textboxes to the form, and bind
each of them to the appropriate table field. When you display the datasheet,
you'll see all 5 textboxes for ALL rows in the table - just like a grid.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
R

ravindar thati

Ravindar,

I don't think you quite understand what I mean, and I don't think you've
tried it yet.

If you have 5 fields you want to show, add 5 textboxes to the form, and bind
each of them to the appropriate table field. When you display the datasheet,
you'll see all 5 textboxes for ALL rows in the table - just like a grid.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia









- Show quoted text -

i can only view all the records at a time if and only if i put the
form property " default property" to "datasheet". you have'nt
mentioned that.

but now i want to add some command buttons, labels and etc to the same
form. can i do that?
i tried adding the command button when the form the form property
"default view" is set to "datasheet". but i was unable to see the
command buttons(might be since the form is set to only datasheet
view).

any way thank you very much.
i dont want to bring the pressure on you.
really thanks. i got the solution. but it would be better if i could
add controls like command buttons, and etc
 
S

Stefan Hoffmann

hi Ravindar,

ravindar said:
i can only view all the records at a time if and only if i put the
form property " default property" to "datasheet". you have'nt
mentioned that.
Take a closer look at the available property values. There should be a
value name endless or continues form or so...

mfG
--> stefan <--
 
G

Graham R Seach

Ravindar,

<<Default View>>
Yes, you're right. I forgot that. Sorry.

<<...now i want to add some command buttons...>>
It would have been nice to know that at the beginning. Do you want to add a
button for EACH row? If so, then you'll have to use a Continous Form (see
the form properties). If not, then you might be better to save the datasheet
as it is, create another form onto whch you'll add the button(s), and add
the datasheet as a subform.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
R

ravindar thati

Ravindar,

<<Default View>>
Yes, you're right. I forgot that. Sorry.

<<...now i want to add some command buttons...>>
It would have been nice to know that at the beginning. Do you want to add a
button for EACH row? If so, then you'll have to use a Continous Form (see
the form properties). If not, then you might be better to save the datasheet
as it is, create another form onto whch you'll add the button(s), and add
the datasheet as a subform.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia









- Show quoted text -

many many thanks Graham,

i got the solution. i have added a check box to each row as per my
requirement.
the form fits to my requirement.
here again i came across a problem. when a check any check box, all
check boxes are getting checked.
i want user to check a single or multiple check boxes.

it seems that it would be better to use sub forms as you said earlier.
thanq
 
G

Graham R Seach

Ravindar,

You shouldn't have any troble adding a simpe CheckBox to a datasheet form.

If you are having trouble, do a search on www.lebans.com. Stephen Lebans is
our resident Guru, and (although I couldn't find it after a brief search) he
does have a solution to that problem.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
R

ravindar thati

hi Ravindar,

your quoting style is really bad. Please read

http://en.wikipedia.org/wiki/TOFU

Thanks.

mfG
--> stefan <--

i am verry sorry. i am really new to this discussion threads. indeed
this is my first thread(ofcourse i have posted another 3 after this).
i will go through that site and will do better.
thanq
 

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