马上注册,结交更多好友,享用更多功能,让你轻松玩转闽南师范大学。
您需要 登录 才可以下载或查看,没有账号?立即加入
×
< > 在ACCESS中,VAB编写这段代码,怎么会出现这种错误呢?!</P>
& ^- o( W, c& V< >谁帮我瞧瞧。先谢了·····</P>8 [) t5 g- T* z6 r( ?. o1 y* S
< > rivate Sub List2_Click()
. R8 T1 m7 A( v Dim str As String" P4 e6 b* Q4 V" n
Dim con As ADODB.Connection '声名数据库对象
% k! x2 t% V3 r: p( O Dim rscA As ADODB.Recordset '声名记录集对象4 q- X' S9 f3 H, B
' Set con = New ADODB.Connection '数据库对象实例化例 dim con as new adodb.connection7 q$ ^5 [% K' k2 F
Set con = CurrentProject.Connection '指定当前数据库为打开数据库 U! t, Y' ?$ ?! a: y2 Q& O' q- E5 E
Set rscA = New ADODB.Recordset '记录集对象实例化 dim rec as new recordset
3 [ f& U3 r: m* X1 V9 t, C8 P # T: T: i2 X. t8 Y3 `
str = "SELECT * FROM 专业 where 专业名称='" & List2.<I>value</I> & "'"3 x" I4 T) n8 D0 x& `' e# Q" Y/ U0 J
rscA.Open str, con, 1, 36 ?4 \0 j! ]' J: K* T
Text4.SetFocus
* {: f1 f" E1 [# R: m Text4.Text = rscA("专业代号")
3 ^0 w% i/ j# u) A$ n( s rscA.Close$ i3 _1 M6 H$ y/ k$ O9 I
Set rscA = Nothing
9 Z% v- k4 G$ s- X' N5 oEnd Sub</P># x0 M+ d, x- n3 n2 q, d( H. m
< >错误提示</P><img src="attachments/dvbbs/2004-5/200451712445786.bmp" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2004-5/200451712445786.bmp\');}" onmousewheel="return imgzoom(this);" alt="" /> |