|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem!
Hi, I am currently making a database containing a tbl product-within this table is a number of fields-but there are two fields that have something in common. Product ID and Barcode
I want to be able to relate this two fields together-so that each time i enter a new product in the form that i have created it adds the barcode number. The relation of the two fields are as follows: Product No Barcode 1 0001 2 0002 3 0003 4 0004 etc So as soon i click to add a new product on the form- and it automatically creates a product ID i want it to do the same with Barcode. Is there any way of doing this? danbwest |
|
#2
|
||||
|
||||
|
Set the Format property of your BarCode field in the form to
0000 and use this code: BarCode = ProductNo In this case you'll have four-length string barcodes that are coposed by your Product No left padded with the appropriate number of zeros.
__________________
BRegs, TBÁrpi "I can only show you the door. You're the one who has to walk through it." |
|
#3
|
|||
|
|||
|
problem not solved
i have done what u have sed by formatting the property of the barcode field and have inserted the code in the property box too...but what i want to actually do isnt happening?!
have i done something wrong? Danbwest |
|
#4
|
|||
|
|||
|
problem not solved
i have done what u have sed by formatting the property of the barcode field and have inserted the code in the property box too...but what i want to actually do isnt happening?!
have i done something wrong? Danbwest |
|
#5
|
|||
|
|||
|
problem not solved
i have done what u have sed by formatting the property of the barcode field and have inserted the code in the property box too...but what i want to actually do isnt happening?!
have i done something wrong? Danbwest |
|
#6
|
||||
|
||||
|
You need to use the code in VBA in the AfterInsert or BeforeInsert event.
|
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Problem! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|