MySQL Forums
Forum List  »  Microsoft Access

Re: Basic Help with MySQL Tables & Access?
Posted by: lynnthu thu
Date: March 31, 2005 06:44AM

my codes are following ...there was a error for recordset is nothing ...Please help me

Dim dbs As Database
Dim rstDBase As Recordset
Dim strQuerySQL As String
Dim y As String
Dim Field3Upd As String
Dim rstScript As Recordset
Option Compare Database




Private Sub Form_Open(Cancel As Integer)
Dim Msg As String, Style As Integer, Response As Integer


Set dbs = CurrentDb()
Me![DBase_ID].SetFocus
y = Me![DBase_ID].Text
strQuerySQL = "SELECT DBase.DBase_ID, DBase.Desc FROM DBase WHERE DBase.DBase_ID = " & "'" & y & "'"
Set rstDBase = dbs.OpenRecordset(strQuerySQL)
If rstDBase.RecordCount = 0 Then
MsgBox ("Âû äîëæíû ñîçäàòü ñóøåñòâóþøóþ òåñòîâóþ áàçó äàííûõ !")
Me![DBase_ID].SetFocus
Exit Sub
End If
Me![DBase_Desc].SetFocus
Me![DBase_Desc].Text = rstDBase!Desc
Field3Upd = Me![DBase_Desc].Text
Me!Script_ID.SetFocus
y = Me!Script_ID.Text
strQuerySQL = "SELECT Script.Desc FROM Script WHERE Script.Script_ID = " & "'" & y & "'"
Set rstScript = dbs.OpenRecordset(strQuerySQL)
If rstScript.RecordCount = 0 Then
MsgBox ("Âû äîëæíû âûáðàòü ñóùåñòâóþùóþ òåñòîâóþ áàçó äàííûõ !")
Exit Sub
End If
Me![DescScript].SetFocus
Me![DescScript].Text = rstScript!Desc
End Sub
Private Sub Command8_Click()
DoCmd.Close
End Sub

Options: ReplyQuote


Subject
Views
Written By
Posted
2655
February 27, 2005 08:13PM
Re: Basic Help with MySQL Tables & Access?
1844
March 31, 2005 06:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.