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

adding values to formfields without id-number



 
 
Thread Tools Display Modes
  #1  
Old December 11th, 2006, 03:23 PM posted to microsoft.public.access,microsoft.public.access.forms
Miikka Hamalainen
external usenet poster
 
Posts: 3
Default adding values to formfields without id-number

Hi there,

I have problems with forms and tables.

I keep getting "duplicate values not allowed"-error message. And I know why
:-)

I have created form from two tables; artist and song

I have linked the tables with artist_id field

What I would like to do is to add new artist to db straight when adding new
song.

For example:

I have created artist Queen(artist_id = 1 ) and would like to add song to
db.
I have form with fields:

artist_name
song_id
song_name

Is it possible to just write "Queen" to artist_name field and access then
would link this song to artist Queen (artist_id =1)?
Or do I have to write some code to check if this artist exists in db or not?
I would like to avoid using ids when adding new songs. I don't want to read
the artist numbers from another sheet, when adding new songs.

Br, Miikka





  #2  
Old December 12th, 2006, 01:13 AM posted to microsoft.public.access,microsoft.public.access.forms
Larry Daugherty
external usenet poster
 
Posts: 1,012
Default adding values to formfields without id-number

I've copied a thread I was in earlier today that deals with the same
issue and shows the way toward a solution with a little confusion
introduced by alternated top posting and bottom posting:

----------------------------------------------------------------------
-----------------------
Yes, you can. That's the way I normally use them.

Assuming that your main form is bound to the Project, design your Task
subform as short as possible so that at the bottom of your main form
you have plenty of room for a subform control that will show multiple
instances of your subform. Make the subform's default view
"continuous forms". The query for the subform should have ProjiectID
in it, usually as the first field. When you have your Form and
subform working together the value of Link Master Field and Link Child
Field should equal the same thing, almost always the same name.

HTH
--
-Larry-
--

wrote in message
ups.com...
I'm currently working on our project database. What we want to do is
for each project, track what tasks need to be done, their complexity
and from that estimate duration for each developer type.

I have setup currently:

tblComplexity
complexID (autonumber)
complexName (with the following values)
Low
Med
High

tblTask
taskID (autonumber)
taskName (with the following values)
GUIDesign
MDBFeed
Report

tblCostLookup
costLookupID (autonumber)
complexID (lookup from tblComplexity)
taskID (lookup from tblTask)
BADuration
SADuration
SEDuration

So tblCostLookup is completely filled in, each task has a value for

BA,
SA and SEDuration for each task/complexity combination.

I have a built a query that can read the values and calculate each
duration which is easy. I can get that to appear in a form using a
subform bound to the query, which just reads the fields from the

combo
boxes on the main form.

The problem I'm running into is each project can have multiple

tasks,
so I need a contin. form setup which I tried using a subform,
unfortunately you can't have a subform in a contin. form.

Any help would be appreciated this is really hanging me up at the
moment.


----------------------------------------------------------------------
----

If you're able to pick your way through the above and substitute your
tables for the two at issue in the thread above you should be able to
resolve your issue. If not, Post back here or in a new thread with
your issues.

HTH
--
-Larry-
--

"Miikka Hamalainen" wrote in message
...
Hi there,

I have problems with forms and tables.

I keep getting "duplicate values not allowed"-error message. And I

know why
:-)

I have created form from two tables; artist and song

I have linked the tables with artist_id field

What I would like to do is to add new artist to db straight when

adding new
song.

For example:

I have created artist Queen(artist_id = 1 ) and would like to add

song to
db.
I have form with fields:

artist_name
song_id
song_name

Is it possible to just write "Queen" to artist_name field and access

then
would link this song to artist Queen (artist_id =1)?
Or do I have to write some code to check if this artist exists in db

or not?
I would like to avoid using ids when adding new songs. I don't want

to read
the artist numbers from another sheet, when adding new songs.

Br, Miikka







 




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 01:30 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.