garths2 it;s you again! Thanks for answering my questions I am really learning a lot from you and from this forum of course... You're my hero [thumbsup]
i got it!
Set rs = New ADODB.Recordset
With rs
.Open "Select * FROM Temp_BOM", conn, adOpenForwardOnly, adLockPessimistic
While .EOF = False
.Delete
.MoveNext
Wend
rs.Requery
End With
Adodc1.Refresh...
...it will import the contents of the excel it will clear my temp table first...
Set rs = New ADODB.Recordset
With rs
.Open "DELETE * FROM Temp_Table", conn, adOpenForwardOnly, adLockPessimistic
End With
Adodc1.Recordset.Requery
Adodc1.Refresh
dgrdMain.Refresh...
oh i think i got it...
' start code
Set rs = New ADODB.Recordset
With rs
.Open "Select * from tblPartNumber", conn, adOpenDynamic, adLockPessimistic
For i = 1 To flgPartNum.Rows - 2
rs.Find "PartNumber = '" & flgPartNum.TextMatrix(i, 0) & "'"
If rs.EOF Then
rs.AddNew...
hi garths2 thanks for the prompt reply i tried your code... but just like mine when the PartNumber is existing I receive an error "The changes you requested to the table were not successful because they would create duplicate vaules in the index..." i can't figure where the error lies... because...
Here's my code...
Set rs = New ADODB.Recordset
With rs
.Open "Select * from tblPartNumber", conn, adOpenForwardOnly, adLockPessimistic
For i = 1 To flgPartNum.Rows - 2
If !PartNumber = flgPartNum.TextMatrix(i, 0) Then
!PartNumber = flgPartNum.TextMatrix(i, 0)
!GenDesc =...
i want to import xls into my table (i mean append not create a new table) the code below creates new table
... the solution that i have as not to receive the error
MyTable already exists... table will be deleted first...
Question: Is there any other way to solve this?
Dim conX As...
i brought my monitor to a electronic shop and they said it was plyback... and they said it's hopeless so i have no choice but to buy another one... i just wonder if that plyback whatever will cause the blinking... (sorry i just have some doubts that the technician mess up my monitor becase he...
Thanks for the prompt reply SonOfEmidec1100 ... i tried your code but still my table is not being updated... if is impossible to update with the connections coded then perhapz i have no choice but to use the adodc (form style) i just dont want to use it as much as possible because it doesn't...
...Security Info=False"
Conn.Open ConnStr
End Function
Dim rsX As ADODB.Recordset
Dim strRs As String
Call Connect_Dbase
strRs = "SELECT * from Temp_Info"
Set rsX = New ADODB.Recordset
rsX.CursorType = adOpenDynamic
rsX.CursorLocation = adUseClient
rsX.LockType =...
i have norton and says successfully deleted... one friend of mine says maybe a monitor problem. you think it is possible? Few days ago my monitor blinks at startup only... but will stop when im at the windows mode... but just last night even if im in the windows mode it still blinking...and...
Greetings! i have 4 drives (partitioned) let's say C:, D:, F: and G: ... I just installed service pack2 and guess what?!!! after installing SP2 when i was about to open my files in drive G it says the disk is not formated, do you want to format it now (something like that) ... i don't know what...
hello pipz! i am having problem with my computer and i don;t know if it was infected by a certain virus... everytime i ON my computer at start up my screen keeps on blinking - but will stop once it is in the windows mode... i dont know if it is a hardware problem or what ... because this is my...
i am not an expert in vb6 i just code when i need to do so and i am having a problem... i am importing an excel to my database(mdb) using thread222-691548 as my basis... my problem now... that code creates a table... and when i run it again i receive an error the table is already existing... so...
hi mmilan,
thanks for the reply but there's a but :)
your code is working well ... but there's one thing i can't get... what if i want to select multiple table(1 table-1 worksheet) so if i have 3 tables i'll get 3 worksheets in one excel file.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.