I am connecting access database named company.mdb having fields COM_CODE, COMPANY, ADD1, ADD2, ADD3, ADD4, BOOK, PAGE
while running program all fields data but the field add2, add3, book & page showing error.
my code is below, kindly suggeste me for what is wrong in coding.
Dim strdb As Database
Dim strrs As Recordset
Private Sub EXIT_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim strdbname As String
Dim strrsname As String
strdbname = "d:\vivek\company.mdb"
strrsname = "company"
Set DB = DBEngine.OpenDatabase("D:\VIVEK\COMPANY.MDB")
Set RS = DB.OpenRecordset("COMPANY")
comp.Text = RS!COM_CODE
compnm.Text = RS!COMPANY
isinno.Text = RS!ISIN
AD1.Text = RS!ADD1
'AD2.Text = RS!ADD2
'AD3.Text = RS!ADD3
AD4.Text = RS!ADD4
BK.Text = RS!BOOK
'PG.Text = RS!Page
End Sub
Vb variable error?
This trouble maybe power supply or inverter boards is defective.
first you can test the voltage of the multr,and then check which part is defective.From Wisiny.com can find those parts
if you have any question,please let us know email:service@wisiny.com.thanks,we sincerely hope we can help you!
you can also check this boards whether suit you:
742GL2 715G2538 3 LEG Lenovo ADTV742GL2 Power Supply Backlight Inverter...
Change the code:
strdbname = "d:\vivek\company.mdb"
Set DB = DBEngine.OpenDatabase("D:\VIVEK\COMPANY.MDB")
strrsname = "company"
Set RS = DB.OpenRecordset("COMPANY")
comp.Text = RS!COM_CODE
compnm.Text = RS!COMPANY
isinno.Text = RS!ISIN
AD1.Text = RS!ADD1
'AD2.Text = RS!ADD2
'AD3.Text = RS!ADD3
AD4.Text = RS!ADD4
BK.Text = RS!BOOK
'PG.Text = RS!Page
to become:
strdbname = "d:\vivek\company.mdb"
Set DB = DBEngine.OpenDatabase(strdbname )
strrsname = "company"
Set RS = DB.OpenRecordset(strrsname )
comp.Text = RS!COM_CODE
compnm.Text = RS!COMPANY
isinno.Text = RS!ISIN
AD1.Text = RS!ADD1
AD2.Text = RS!ADD2
AD3.Text = RS!ADD3
AD4.Text = RS!ADD4
BK.Text = RS!BOOK
PG.Text = RS!Page
mostly to eliminate the extra "quote" (') characters,
and to use the values you set.
349 views
Usually answered in minutes!
×