Add an editable column to a bound query

I am pulling up the following query to my datagrid in a vb6 form.  The resulting query results cannot be edited,  However, I would like to add a temporary column at the end of the results which will enable me to add temporary data.  Is this possible?

select g.Agency,g.Goal,o.Objective,p.PI,P.Method,a.[ActivityName],P.[ProjectedHours],a.Data, s.ProgressSetback
from tblOrgGoals G 
LEFT Join tblOrgObjectives O on G.GoalID = O.GoalID and g.agencyid=o.agencyid
LEFT Join tblOrgActivities A on O.ObjectiveID = A.ObjectiveID and g.agencyid=a.agencyid
LEFT Join tblOrgPI P on P.ActivityID = A.ActivityID and g.agencyid=p.agencyid
LEFT Join tblOrgMonthlyProgressSetbacks S on p.PIID = s.piid and g.agencyid=s.agencyid
Where s.AgencyID = 74 And s.monthlyid = 3 And s.piid = 1  order by G.Agency,G.Goal

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

al4629740Author Commented:
This question asks how to add an additional column at the end of a table in a datagrid.  Different question, but delete if you deem it to be so.
Brian CroweDatabase AdministratorCommented:
There are several ways to do this including adding a column to your ADO Datatable or just adding an empty column to your SELECT.

select g.Agency,g.Goal,o.Objective,p.PI,P.Method,a.[ActivityName],P.[ProjectedHours],a.Data, s.ProgressSetback, '' AS TempColumn --Casting would be a good idea here to get the type and size you need

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
al4629740Author Commented:
Thank you.  That's exactly what I was looking for.  Is there a way to edit the column directly with the mouse?  Either Datagrid or msflexgrid?
Brian CroweDatabase AdministratorCommented:
Unfortunately that's more of a VB question and I haven't done any VB programming in years.

I would suggest posting another question or googling it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.