[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

dbgrid cell button

I'm using VB5(SP3)

I have a 5 Row 7 Column dbgrid on form1
The grid has the cell button enabled for column 3

I want to click on the button in Row 4 Column 3 and launch form2.

I then want to click a command button on form2 to send the value of a textbox to Row 4 Column 3 on form1

I have no Idea how to use the cell button to launch form2 or update the cell on form1 from form2

Can anyone help?
0
backflash
Asked:
backflash
1 Solution
 
TimCotteeCommented:
Private Sub DBGrid1_ButtonClick(ByVal ColIndex As Integer)
    If DBGrid1.Row = 4 And ColIndex = 3 Then form2.Show
End Sub

And

Private Sub Command1_Click()
    Form1.DBGrid1.Text = Text1.Text
    Unload Me
End Sub

Should show you how you could achieve this!

Hope it helps.
0
 
backflashAuthor Commented:
Works like a charm

Thanks Tim
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now