Tamamlanmış

VB Code Error

? am having code problems. The attached code is a piece of a database maintenance program. We have added a couple of fields and changed the archive process. The customer did not want us to delete the record when the item became obsolete like we used to do. They wanted most of the fields blanked out so they knew they needed to make more of that item. We changed the process to archive the old record, edit certain fields in the existing records and finish with an update. Saving works ok as does placing a copy in the audit file. As it stands now when it record is closed it is archived (a copy of the record is added to the archive database). The way it used to work is a new record would be added with a new ID number. Now copies are being added to the archive with the SAME ID number. We turned off the primary key so we could do this and now are gerring an error that there are dups in the ID field when we try to read the archive file. I need to look at this code and see if we can ignore the dups in the ID field when we read the archive table. Code is pasted into the comments

## Deliverables

Private Sub icbTables_Click() On Error GoTo Error Dim li As ListItem 'Check if the user chose a regular or archive table to look at Set db = OpenDb([url removed, login to view]) 'fraReagent is a hidden frame that includes all of the fields of a reagent table 'If the table is not of this type, then all of the fields can be hidden in one go Set rs = [url removed, login to view](Mid([url removed, login to view], 2)) [url removed, login to view] = "REAGENT NAME" 'Tables are indexed on the REAGENT NAME field [url removed, login to view] = True [url removed, login to view] = True 'Clear the records list view [url removed, login to view] 'And fill it with the records With rs While Not .EOF 'If [url removed, login to view] = "Archives" Then 'Set li = [url removed, login to view](, "k" & .Fields("ArchiveID"), CheckNull([url removed, login to view]("REAGENT NAME"))) 'Else Set li = [url removed, login to view](, "k" & .Fields("ID"), CheckNull([url removed, login to view]("REAGENT NAME"))) 'End If .MoveNext Wend 'Show details of first record lvRecord_ItemClick [url removed, login to view] End With If [url removed, login to view] = "Archives" Then [url removed, login to view] = False [url removed, login to view] = False [url removed, login to view] = False [url removed, login to view] = False [url removed, login to view] = False Else [url removed, login to view] = True [url removed, login to view] = True [url removed, login to view] = True [url removed, login to view] = True [url removed, login to view] = True End If Exit Sub Error: GeneralErrors "icbTables_Click", [url removed, login to view], [url removed, login to view] Resume Next End Sub Open in New Window Select All Tags: vb6

Beceriler: Mühendislik, Microsoft, MySQL, PHP, Proje Yönetimi, Yazılım Mimarisi, Yazılım Test Etme, Visual Basic, Windows Masaüstü

Daha fazlasını gör: id to code, err go, copy of resume, audit program, audit php code, audit file, audit details, archive problems, audit process, eof, vb6 read code, regular basic, read file error number, customer name error, add field code, tag code, maintenance window, vb6 file delete, vb6 delete file, piece code

İşveren Hakkında:
( 72 değerlendirme ) Lexington, United States

Proje NO: #3795014

Seçilen:

hwanghendra

See private message.

%selectedBids___i_period_sub_7% gün içinde 33.15%project_currencyDetails_sign_sub_9% %project_currencyDetails_code_sub_10%
(452 Değerlendirme)
6.9

Bu iş için 9 freelancer ortalamada $47 teklif veriyor

finecodervw

See private message.

$21.25 USD in 6 gün içinde
(160 Değerlendirme)
6.3
jawadh

See private message.

$85 USD in 6 gün içinde
(83 Değerlendirme)
6.0
rajivk2k

See private message.

$68 USD in 6 gün içinde
(26 Değerlendirme)
4.4
chandreshkumarlx

See private message.

$42.5 USD in 6 gün içinde
(17 Değerlendirme)
4.2
velocityinf

See private message.

$18.7 USD in 6 gün içinde
(17 Değerlendirme)
3.7
josereyes

See private message.

$85 USD in 6 gün içinde
(2 Değerlendirme)
2.8
mehuldaxini

See private message.

$51 USD in 6 gün içinde
(3 Değerlendirme)
1.3
vivekbtech

See private message.

$17 USD in 6 gün içinde
(0 Değerlendirme)
0.0