Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing data

Status
Not open for further replies.

MichHart

Programmer
Dec 14, 2002
56
CA
Hi everyone:


I know this can be done, but the layout for it is stumping me. I have a list of players and I want to be able to display the information about the player as his name is selected from the list. How do I connect to the table and take the info on that player from certain fields in the table?

Thanks in advance
Mich
 
I can't help you much, but it sounds like you are trying to accomplish a similar task. I have created a class module that stores report information. I want to list the reports and have a description/category display when the user selects a report but I am having a syntax problem. If I figure out how to get it working I will let you know.

Rene'
 
Actually what I am trying to do is quite simple, I am just feeling brainless today though.

All I want to do is take the info that has been saved in the table on a player that I select from a listbox.

I am used to programming with data controls and if that was the case I would have no problem here, but I have to use SQL with this program and I am not accustomed to it.

Mich
 
What database are you using? What data access method, ADO? Do you need help with the connection syntax, SQL syntax, or both?

Rene'
 
Here is a sample of the code.

I need to find out how I take the select I make in the list go to the table, retrieve that record, and then display all the data in apprpriate fields on the form.

Set db = New Connection

db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Common.mdb" 'Path Of database


Set rs = New Recordset

'what i need to do is when a player is selected from the list, the record will be retrieved and all the apprpriate fields will be filled
'on the players screen on the appropriate tabs

'How?


rs.Open "SELECT * FROM Players WHERE Players.[FirstName] And Players.[LastName] = " & "'" & lstPlayers.Text & "'", db, adOpenStatic, adLockOptimistic


thanks for any help
Mich
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top