|
-
Mar 4th, 2002, 03:37 AM
#1
Keyboard gets hanged , why??
hi all:
i've finally finished my project ,
in one of the form's i have the following :
* i'm using Msflexgrid connected to 2000 Access database file ,
* using a text box to enter data on it ,
* using a command button to add this data to the Db file Table and make refresh for the Data1 control and the Msflexgrid
and after this make Setfocus back again to the textBox to enter data again and so on.
Why My Keyboard Get not responding (Halted) after a while ?
but when i do log off , and log in again the keyboard work's again
and so on
Urgent , many thanxxxxx for all...
-
Mar 4th, 2002, 04:03 AM
#2
Bouncy Member
maybe something you do puts your program in an infinite loop???
-
Mar 4th, 2002, 04:14 AM
#3
Impossible
hi :
if something is wrong , then the keyboard should hang after the first command_button click , but it work's for several time's ...
-
Mar 4th, 2002, 04:53 AM
#4
Bouncy Member
you positive that it the click event that's causing the problem?
if so could you paste you're code for it, might be easier then...
-
Mar 5th, 2002, 12:26 AM
#5
here's the code
Private Sub cmdreserve_Click()
Dim dog As Database
Dim cat As Recordset
Set dog = DBEngine.Workspaces(0).OpenDatabase("c:\Juirsy\" & Module1.labprefix & ".mdb")
If Module1.create = 0 And Module1.txtopen = 1 Then
Set cat = dog.OpenRecordset(frmopen.tableopen)
ElseIf Module1.create = 1 And Module1.txtopen = 0 Then
Set cat = dog.OpenRecordset(frmnew.txttablename)
End If
cat.AddNew
If mnustandard.Checked = True Then
If Val(txtpcno.Text) < 10 Then
cat("pc no") = "00" & Val(txtpcno.Text)
ElseIf (Val(txtpcno.Text) >= 10) And (Val(txtpcno.Text) < 100) Then
cat("pc no") = "0" & Val(txtpcno.Text)
Else
cat("pc no") = txtpcno.Text
End If
ElseIf mnuadvanced.Checked = True Then
cat("pc no") = LCase(txtpcno.Text)
End If
If Len(txtstuno.Text) < 7 Then
stunolen = (7 - Len(txtstuno.Text))
cat("Student Number") = String(stunolen, "0") & txtstuno.Text
Else
cat("Student Number") = txtstuno.Text
End If
cat("Time") = Format(Time, "hh:mm:ss AM/PM")
cat.Update
Data1.Refresh
cat.Close
dog.Close
txtpcno.Text = ""
txtstuno.Text = ""
txttime.Text = ""
txtstuno.SetFocus
'Load frmfind
'frmfind.Data1.Refresh
'**************************8
With flexgrid1
.ColWidth(0) = 1400
.ColWidth(1) = 2400
.ColWidth(2) = 2100
.TextMatrix(0, 0) = "PC Number"
.TextMatrix(0, 1) = "Student Number"
.TextMatrix(0, 2) = "Time"
.FillStyle = flexFillRepeat
.Col = 0
.Row = 0
.ColSel = 2
.RowSel = 0
.CellFontBold = True
.CellAlignment = flexAlignCenterCenter
'If flexgrid1.rows > 1 Then
'With flexgrid1
'.FillStyle = flexFillRepeat
'.Col = 0
'.Row = 1
'.ColSel = 2
'.RowSel = flexgrid1.rows - 1
'.CellAlignment = flexAlignCenterCenter
'End With
'End If
.FillStyle = flexFillSingle
.Col = 0
.Row = 0
End With
mnuprint.Enabled = True
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|