can u help me, i need to get the data from the table, but the table will be based on the text on textbox, like the fieldname that will be based on aniTypes.text ...

AnimalRS.Open ("select * from & AniKindtxt.text & where AniTypes='" & AniTypestxt.Text & "'"), Animals

this is not working .. help me please

example
when AniKind.text = "Mammals"
it will look for the table name that named Mammals in the database

it seems that you're trying to build sql query on the basis of textbox values
try following:-

"select * from " & AniKindtxt.Text & " where AniTypes='" & AniTypestxt.Text & "'"

one more thing about what you write in you thread:-
AnimalRS.Open ("select * from & AniKindtxt.text & where AniTypes='" & AniTypestxt.Text & "'"), Animals

here i dont understand why using ,Animals after the AnimalRS.open(), if its a connection object then need to write as following:-

AnimalRS.Open ("select * from " & AniKindtxt.Text & " where AniTypes='" & AniTypestxt.Text & "'",Animals,2,3)

if it isn't your Connection object then put the connection object name in the place of Animals.

hope this helps you.

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.