Office中国论坛/Access中国论坛
标题:
请高手帮忙!
[打印本页]
作者:
liuxiujuan1473
时间:
2005-6-22 18:35
标题:
请高手帮忙!
我的数据库中,card字段由原来的number改为Text,我在输入card时,原来由可以自动选择Name,现在老是提示这句出错.Set rsMat = dbs.OpenRecordset(strTemp),请高手指点,万分感谢!!
Private Sub Card_LostFocus()
Dim inRowcount As Integer
Dim strMsg As String
If Not IsNull(Me![Name]) Then
Exit Sub
End If
Set dbs = CurrentDb
If IsNull(Me![Card]) Or Not IsNull(Trim(Me![Name])) Then
Exit Sub
End If
strTemp = "select card, name from [basic information] where card=" & Str(Me![Card])
'MsgBox strTemp
With dbs
Set rsMat = dbs.OpenRecordset(strTemp)
inRowcount = rsMat.RecordCount
' MsgBox "Row count:" + Str(inRowcount)
If inRowcount = 0 Then
strMsg = "Card " + Str(Me![Card]) + " does not exist"
MsgBox strMsg
Else
With rsMat
Me![Name] = .Fields("name")
End With
End If
rsMat.Close
End With
dbs.Close
End Sub
作者:
liuxiujuan1473
时间:
2005-6-22 18:59
标题:
高手帮忙!
请高手帮忙!
作者:
liuxiujuan1473
时间:
2005-6-22 19:01
标题:
上传
上传
作者:
海狸先生
时间:
2005-6-22 19:23
上传文件
作者:
liuxiujuan1473
时间:
2005-6-22 19:31
我传了好多次都不成功啊,请问该怎么上传啊?
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3