thanks a lot for your help :)
heres the code of the parent form
Private Sub grdSchedule_Click()
intScheduleID = grdSchedule.TextMatrix(grdSchedule.RowSel, 0)
cmdEdit.Enabled = True
cmdDelete.Enabled = True
Enable_Reports (True)
cmdView.Enabled = True
End Sub
Private Sub...
Also if I add a msgbox("test") at the end of the form_load the problem disappears, as soon as i remove msgbox it starts executing the grd_click again
Also to get to this form i have to either double click on a grid on another form or click the button. Now when i click the button i dont have this happening, but when i double click the grid this happens. But the code in the double click of the grid and the command button is identical on that...
Private Sub grdRoster_Click()
intRosterID = grdRoster.TextMatrix(grdRoster.RowSel, 0)
cmdDelete.Enabled = True
End Sub
Private Sub Load_Boxes()
Dim strYN As String
Dim intYN As Integer
Dim intRoom As Integer
Dim intLocation As Integer
Dim intFacilitator As Integer
Dim intEvent As...
k here is the code...
Private Sub Form_Load()
MDIMain.Center Me
MDIMain.DisableCloseWindowButton Me
Call Load_cmbEvent
Call Load_cmbFacilitator
Call Load_cmbLocation
Call cmbLocation_Click
If intScheduleEdit = 2 Then
Call Load_Boxes
Call...
yes but the thing is the grid was never actually clicked on by the user. It executes the grid_click all by it self without being clicked on, and i dont know why.
Private Sub Form_Load()
cmdDelete.Enabled = False
Load_Grid
bLoaded = True
End Sub
Private Sub Grid_Click()...
Its a Flex Grid.
I actually need the Command1.Enabled = False unless the grid was clicked on with a mouse.
thanks
here is the code...
Private Sub Grid_Click()
'Get selected rec
cmdDelete.Enabled = True
End Sub
When the grid is clicked on, cmdDelete is enabled so I can delete the...
I have a grid, and when you click and select something on it a command button is enabled.
In form load the grid is loaded with data. For some reason after its loaded it executes the on click code and the command button is enabled. Why does it do that? when the grid wasnt actually clicked on...
I have 2 Combos, the 2nd is loaded based on the selection of the first. Because of that the 2nd combo is sometimes empty and sometimes isnt. When it is not empty and has items in it, I want to get rid of the first blank item. So I set Combo.ListIndex = 0 and this works fine. But when based on...
ok...here is how the combo is loaded.
Do While Not DBRec.EOF
cmbRoom.AddItem DBRec("Name")
cmbRoom.ItemData(cmbRoom.NewIndex) = DBRec("RoomID")
DBRec.MoveNext
Loop
this loads the combo with the names and roomids
then based on the id i have, i need to set the...
I am trying to get the ItemData that I loaded with the Items when I was loading the Combo
But even if I use strLoc = cmbLocation.Text to get the Text, I would get the first text loaded into the combo box and not the text that is selected.
Public DBConn As ADODB.Connection
Public DBComm As ADODB.Command
Public DBRec As ADODB.Recordset
Set DBConn = New ADODB.Connection
Set DBComm = New ADODB.Command
Set DBRec = New ADODB.Recordset
DBConn.ConnectionString = "Your Connection"
DBConn.Open
DBComm.ActiveConnection = DBConn...
I am editing a form, in the form the combo is loaded with data from an access table. Then the combo is set to the value thats in the record. Using this code...
strYN = DBRec("Location")
For idx = 0 To cmbLocation.ListCount - 1
If cmbLocation.ItemData(idx) = strYN Then...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.