Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

VB6.0, DataGrid control

Posted on 2004-11-22
8
Medium Priority
?
8,248 Views
Last Modified: 2012-06-21
Hi Experts,

I have a project developed in VB6.0 and am using Access2000 as my backened. I have a PurchaseMaster form which displays the purchaseproductdetails in a datagrid, I have placed a combobox on this grid which display the PartNos of the products, when the PartNo is selected in the combobox the respected Productdetails should be picked up from another table and displayed in the datagrid.. I am using a combobox making it visible on buttonclick_event of the datagrid but my problem is when the user selects the PartNo from the combobox, the productdetails do not get displayed in the grid but if I enter the PartNo manually i.e. without selecting from the combobox the productdetails get displayed properly. I have written a code showproductdetails which executes when the PartNo column on the grid is updated...

Can anybody please help me sort this problem as I am stuck... :(
0
Comment
Question by:twinkle2003
  • 3
  • 3
7 Comments
 
LVL 8

Expert Comment

by:ampapa
ID: 12643040
Sounds like your part numberin the combo is a text/integer that is incorrect format for your query? What data type is your part number? What data type is your combo?
0
 

Author Comment

by:twinkle2003
ID: 12647250
Hi!

My partNo is is of "text" datatype.. and my combodata type is also of "text". Like I mentioned my query works fine, I get the data displayed in the grid if I enter the PartNo directly in the partno column of the Grid, but if I select teh same PartNo from the combo nothing happens, my focus moves to the next control without giving any results...

0
 
LVL 8

Expert Comment

by:ampapa
ID: 12650714
Here are a few questions you should ask yourself.

Is there a recordset being generated from the combo?
Are you refreshing the grid to populate it with the data from the recordset after bing selected from the combo?
How is the combo populated?
Are you trimming your variable to eliminate leading and trailing spaces before inserting into the combo, Trim()?
Does the same query run for both a manual entry and a combo entry?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:twinkle2003
ID: 12653176
Hi guys!

I have worked out a solution myself, and it works just fine...





0
 
LVL 8

Expert Comment

by:ampapa
ID: 12653316
For future reference how did you solve your problem?
0
 

Author Comment

by:twinkle2003
ID: 12672624
I wrote a procedure "ShowProductDeatils" which picks up record from the table categoryMaster based on the PartNo selected in the combo and then I pass this field values retrieved to each of the datagrid column, I calls this procedure at the comboclick_event...
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12924732
PAQed with points refunded (50)

modulo
Community Support Moderator
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question