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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

designing form for inserting records into separate tables



 
 
Thread Tools Display Modes
  #1  
Old May 17th, 2010, 07:39 AM posted to microsoft.public.access.tablesdbdesign
Masoud
external usenet poster
 
Posts: 24
Default designing form for inserting records into separate tables

Hello

I want to design my database for inserting records in 2 separate tables and
after make search event for searching in both tables and retrieve records.
Table 1 contains these fields:

Proj id: 2042
Field code: COM
Discipline: MG
Title: test 1
Doc Type: PR
Serial: 0002
Doc No: concatenated by Proj id+"-"+ Field code+"-"+ Discipline+"-"+ Doc
Type+"-"+ Serial and result should be some thing: 2042-COM-MG-PR-0002
Value of Doc No has been made by coding when inserting records in the form.

Table 2 contains these fields:

Projid: 2042
Doc TypeW
Unit: 114
Title:
Material Code: 1431
Serial: 0002
Doc No: Doc Type+"-"+ Projid+"-"+ Unit+"-"+ Material Code+"-"+ Serial and
result should be some thing like: DW-2042-114-1431-0002
Value of Doc No has been made by coding when inserting records in the form.
Now I want to make a form for inserting these records in the tables, how I
can do it? I mean with 1 form we can do it?
Also for searching in 2 tables and retrieving records into 1 form what I
have to do?
Thanks in advanced.

Ads
  #2  
Old May 17th, 2010, 01:07 PM posted to microsoft.public.access.tablesdbdesign
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default designing form for inserting records into separate tables

First of all, you should not be storing the value for DocNo. Just calculate
it on the fly, using an expression such as you have shown as the Control
Source of a text box or as a query field. However, you should be using &,
not + as the concatenation operator. The + sign may be used for special
circumstances, but it can also lead to unexpected results.

It is difficult to tell what is going on just from a listing of fields and no
description of structure and relationships, but it seems to me there should
be just one table, especially if ProjID is the primary key of both. You want
both records on the same form, but to do that you would need to combine them
in some way. If Table2 is related to Table1 by way of ProjID (one Table1
record may have several related Table2 records) you would use a form and
subform, but otherwise there does not seem to be a reason to attempt to
combine the two tables into one.

Masoud wrote:
Hello

I want to design my database for inserting records in 2 separate tables and
after make search event for searching in both tables and retrieve records.
Table 1 contains these fields:

Proj id: 2042
Field code: COM
Discipline: MG
Title: test 1
Doc Type: PR
Serial: 0002
Doc No: concatenated by Proj id+"-"+ Field code+"-"+ Discipline+"-"+ Doc
Type+"-"+ Serial and result should be some thing: 2042-COM-MG-PR-0002
Value of Doc No has been made by coding when inserting records in the form.

Table 2 contains these fields:

Projid: 2042
Doc TypeW
Unit: 114
Title:
Material Code: 1431
Serial: 0002
Doc No: Doc Type+"-"+ Projid+"-"+ Unit+"-"+ Material Code+"-"+ Serial and
result should be some thing like: DW-2042-114-1431-0002
Value of Doc No has been made by coding when inserting records in the form.
Now I want to make a form for inserting these records in the tables, how I
can do it? I mean with 1 form we can do it?
Also for searching in 2 tables and retrieving records into 1 form what I
have to do?
Thanks in advanced.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/201005/1

 




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 11:54 AM.


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