A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how can i repeat selected fields on an access 2007 form



 
 
Thread Tools Display Modes
  #1  
Old September 21st, 2009, 10:01 PM posted to microsoft.public.access.gettingstarted
Dann
external usenet poster
 
Posts: 10
Default how can i repeat selected fields on an access 2007 form

i am trying to create a BOM datta entry form using access 2007. I have one
table. i would like to repeat the drawing number, description, issue date
type fields as i add new records without re-typing.


thanks for your help
  #2  
Old September 21st, 2009, 10:24 PM posted to microsoft.public.access.gettingstarted
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default how can i repeat selected fields on an access 2007 form

Why not use a subform to enter non-repeating data?

Have one-to-many something like this --
Project
Drawing
Material
Set relationship for one-to-many and Referential Integerity with Cascade
Update.

Use three forms set as --
Project Form
Drawing Subform
Material Subform

--
Build a little, test a little.


"dann" wrote:

i am trying to create a BOM datta entry form using access 2007. I have one
table. i would like to repeat the drawing number, description, issue date
type fields as i add new records without re-typing.


thanks for your help

  #3  
Old September 22nd, 2009, 12:39 AM posted to microsoft.public.access.gettingstarted
Larry Daugherty
external usenet poster
 
Posts: 1,012
Default how can i repeat selected fields on an access 2007 form

Place the following declaration in a standard module.

Public Const CQuote = """" 'that's two quotes - used in string and
Where clause formation


Then place a copy of the below line of code in the After_Update event
routine for each textbox whose value you wish to carry forward.

Me!Name.DefaultValue = CQuote & Me!Name.Value & CQuote

HTH
--
-Larry-
--

"dann" wrote in message
...
i am trying to create a BOM datta entry form using access 2007. I

have one
table. i would like to repeat the drawing number, description, issue

date
type fields as i add new records without re-typing.


thanks for your help



  #4  
Old September 22nd, 2009, 01:30 PM posted to microsoft.public.access.gettingstarted
KenSheridan via AccessMonster.com
external usenet poster
 
Posts: 1,610
Default how can i repeat selected fields on an access 2007 form

By having only one table it sounds like you are using Access more like a
spreadsheet than a database, hence the repetitive data.

The classic way of modelling a bill of materials is to have two tables, one
of Parts. Each assembly or sub-assembly is included in this table as well as
base parts, so it might look like this:

PartNum PartName Weight
1 Assembly 1 0
2 Assembly 2 0
3 Assembly 3 0
4 Assembly 4 0
5 Assembly 5 0
6 Part 1 10
7 Part 2 5

Then a PartStructure table references the PartNum column of the above table
in Majorpart and MinorPart columns like so:

MajorPartNum MinorPartNum Quantity
1 2 2
1 3 3
2 3 4
2 4 2
3 4 1
3 5 2
4 5 3
5 6 2
5 7 1


Your newsreader may well have screwed up the alignment of the above, but I
hope you can see what its doing, e.g. assembly 1 is made up of assemblies 2
and 3, assembly 2 of assemblies 3 and 4 and so on.

Data such as drawing numbers would do in another table related to the Parts
table by PartNum (if each drawing relates to one assembly only), or by a
further table to model the many-to-many relationship if a drawing relates to
multiple assemblies. Whichever is the case the repetitive data is avoided
and the tables are thus normalized.

You'll find a simple demo from which the above data is taken at:

http://community.netscape.com/n/pfx/...apps&tid=23133


The file is attached to the second post in the thread.

Ken Sheridan
Stafford, England

dann wrote:
i am trying to create a BOM datta entry form using access 2007. I have one
table. i would like to repeat the drawing number, description, issue date
type fields as i add new records without re-typing.

thanks for your help


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200909/1

  #5  
Old September 22nd, 2009, 03:25 PM posted to microsoft.public.access.gettingstarted
Dann
external usenet poster
 
Posts: 10
Default how can i repeat selected fields on an access 2007 form

larry,

thank you for the help. please bear with me, i am very new to this. how do i
add the declaration to a standard module?



"Larry Daugherty" wrote:

Place the following declaration in a standard module.

Public Const CQuote = """" 'that's two quotes - used in string and
Where clause formation


Then place a copy of the below line of code in the After_Update event
routine for each textbox whose value you wish to carry forward.

Me!Name.DefaultValue = CQuote & Me!Name.Value & CQuote

HTH
--
-Larry-
--

"dann" wrote in message
...
i am trying to create a BOM datta entry form using access 2007. I

have one
table. i would like to repeat the drawing number, description, issue

date
type fields as i add new records without re-typing.


thanks for your help




  #6  
Old September 22nd, 2009, 03:27 PM posted to microsoft.public.access.gettingstarted
Dann
external usenet poster
 
Posts: 10
Default how can i repeat selected fields on an access 2007 form

karl,

thanks for the reply. i am going to try the suggestion from mr. daugherty
first, then yours, and finally mr. sheridan. the people on this forum are the
best.

"KARL DEWEY" wrote:

Why not use a subform to enter non-repeating data?

Have one-to-many something like this --
Project
Drawing
Material
Set relationship for one-to-many and Referential Integerity with Cascade
Update.

Use three forms set as --
Project Form
Drawing Subform
Material Subform

--
Build a little, test a little.


"dann" wrote:

i am trying to create a BOM datta entry form using access 2007. I have one
table. i would like to repeat the drawing number, description, issue date
type fields as i add new records without re-typing.


thanks for your help

  #7  
Old September 22nd, 2009, 03:31 PM posted to microsoft.public.access.gettingstarted
Dann
external usenet poster
 
Posts: 10
Default how can i repeat selected fields on an access 2007 form

ken,

you hit the nail on the head with your observation. we are currently using
an excel based form for recording the bom info, then saving each form
individually in a seperate file.

the templates are outstanding and i will attempt to adapt them if the
solution in post 2 and 1 do not work out.

thank you for the help!

"KenSheridan via AccessMonster.com" wrote:

By having only one table it sounds like you are using Access more like a
spreadsheet than a database, hence the repetitive data.

The classic way of modelling a bill of materials is to have two tables, one
of Parts. Each assembly or sub-assembly is included in this table as well as
base parts, so it might look like this:

PartNum PartName Weight
1 Assembly 1 0
2 Assembly 2 0
3 Assembly 3 0
4 Assembly 4 0
5 Assembly 5 0
6 Part 1 10
7 Part 2 5

Then a PartStructure table references the PartNum column of the above table
in Majorpart and MinorPart columns like so:

MajorPartNum MinorPartNum Quantity
1 2 2
1 3 3
2 3 4
2 4 2
3 4 1
3 5 2
4 5 3
5 6 2
5 7 1


Your newsreader may well have screwed up the alignment of the above, but I
hope you can see what its doing, e.g. assembly 1 is made up of assemblies 2
and 3, assembly 2 of assemblies 3 and 4 and so on.

Data such as drawing numbers would do in another table related to the Parts
table by PartNum (if each drawing relates to one assembly only), or by a
further table to model the many-to-many relationship if a drawing relates to
multiple assemblies. Whichever is the case the repetitive data is avoided
and the tables are thus normalized.

You'll find a simple demo from which the above data is taken at:

http://community.netscape.com/n/pfx/...apps&tid=23133


The file is attached to the second post in the thread.

Ken Sheridan
Stafford, England

dann wrote:
i am trying to create a BOM datta entry form using access 2007. I have one
table. i would like to repeat the drawing number, description, issue date
type fields as i add new records without re-typing.

thanks for your help


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200909/1


  #8  
Old September 22nd, 2009, 10:17 PM posted to microsoft.public.access.gettingstarted
Larry Daugherty
external usenet poster
 
Posts: 1,012
Default how can i repeat selected fields on an access 2007 form

A standard module is one that is not a class module - such as the
module for a form. If you already have modules showing in the
Database|Modules window then you can add the line in an appropriate
module. If you don't see any modules, click the New button and create
one and put your line of code in it.

HTH
--
-Larry-
--

"dann" wrote in message
...
larry,

thank you for the help. please bear with me, i am very new to this.

how do i
add the declaration to a standard module?



"Larry Daugherty" wrote:

Place the following declaration in a standard module.

Public Const CQuote = """" 'that's two quotes - used in string

and
Where clause formation


Then place a copy of the below line of code in the After_Update

event
routine for each textbox whose value you wish to carry forward.

Me!Name.DefaultValue = CQuote & Me!Name.Value & CQuote

HTH
--
-Larry-
--

"dann" wrote in message
...
i am trying to create a BOM datta entry form using access 2007.

I
have one
table. i would like to repeat the drawing number, description,

issue
date
type fields as i add new records without re-typing.


thanks for your help






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.