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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange Data-Bound Grid selection behaviour

Status
Not open for further replies.

Sideman

Technical User
Apr 21, 2003
41
US
Hi again all...been awhile,
I'm having a problem with a datagrid, allow me to describe it...

VB6/Access 2000
I have two forms and am using an ADODC
The purpose of the first form is to allow the user to gather line item data for an order. On this form, there are 3 command buttons to choose different categories of items. When one is clicked, the second form is loaded which has a data bound grid displaying the related table's data. The user just highlights the desired row and clicks OK. Then, by assigning that record's primary key ID to a public variable on form 1, I am able to return to form 1 and display the data selected as a line item entry.

Now the problem...This works perfectly EXCEPT when the top row of the form 2 data grid is chosen. Then nothing is displayed. It's behaviour is as if no grid selection was made before clicking OK.

Any ideas??

Of all the things I've lost, I miss my mind the most!
Sideman
 
OK, uhhh, never mind...dduuuhhhhhhh...had a senior moment!!

vbNull actually equals 1 and I was saying that if no selection was made, set the global variable to (what else but) vbNull.

Arrrgghhhhhh...getting old sucks!!!

Of all the things I've lost, I miss my mind the most!
Sideman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top