Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 17th, 2004, 12:19 AM
Authorized User
 
Join Date: Jul 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tasha Send a message via Yahoo to Tasha
Default creating field

hi there,

i need to create a field that has this format
[YYWWMMwwxxxx],YY=year, WW=workweek(assume 52 per year) ,
MM= machine , ww=winders , xxxx=running numbers

total machines=16
winders per machine = 6

this field is used as a unique id to identify when product(reels)that being produce (year & work week),which machine,winders that produces the reels and the running number indicates the total reels produced in a week and will be reset every week.

example : running number = 0001=1 reel has been produced.
Is it possible I create a field containing all this so that in future easier for me to identify the particular product referring to this unique id?and I must store this id in my database. I am beginner so please be kind.

Thanks alot


tasha
__________________
tasha
 
Old August 18th, 2004, 02:06 AM
Authorized User
 
Join Date: Aug 2004
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think you will find it useful to have the data you mention in separate fields and make another based on the concatenation (adding together) of those fields. NB. everything needs to be text, so you may need to convert the field contents in your expression.

QUERY EXPRESSION
MyField: [Categories]![Project Number] & [Categories]![Board] & [Categories]![Business Unit]

SQL
SELECT [Categories]![Project Number] & [Categories]![Board] & [Categories]![Business Unit] AS MyField
FROM Categories;


-----------------------
Regards BrianB
Most problems occur from starting at the wrong place.
Use a cup of coffee to make Windows run faster.
It is easy until you know how.
 
Old August 20th, 2004, 02:42 AM
Authorized User
 
Join Date: Jul 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tasha Send a message via Yahoo to Tasha
Default

thanks brian, i have a a table that stores that particular information that i mentioned earlier, can i automatically create a new field from other fields within the same table?

i.e
date
machine
winder

tasha
 
Old August 20th, 2004, 02:53 AM
Authorized User
 
Join Date: Jul 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tasha Send a message via Yahoo to Tasha
Default

thanks brian, i have a a table that stores that particular information that i mentioned earlier, can i automatically create a new field from other fields within the same table and how do i convert the contents in expression?

i.e
1.date 2.machine 3.winder 4.running number

5.dt_mchn_wndr_runninnum (new field)

2.The running numbers will be increased by 1 everytime the user choose new record and will reset once in a week. how can i do that?

sorry i am very new in vba.thanks alot.




tasha





Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy previous field record if next field is null ecampos Access VBA 6 June 23rd, 2006 12:55 PM
Creating an auto update date field tmswenson MySQL 3 January 4th, 2006 03:12 PM
Creating Field Definition Files in Crystal Reports ejan Pro VB 6 0 February 4th, 2005 03:11 PM
Creating Field Definition Files ejan Pro VB 6 0 December 31st, 2004 08:15 AM
Creating Field Definition Files ejan Crystal Reports 0 December 31st, 2004 08:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.