Form??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike

    Form??

    Hello, I created a form with 3 fields. The objective is to input all
    my CD Albums that I have. The 3 fields are, Artist Name; Album Title;
    Song Title;...

    What I want to avoid is inputing the name of the artist and the album
    title more than once. Example: I open the form type the artist name
    then the album title, the first song, then go to the next record, and
    the artist name and album title are already there, so that I would
    only worry about typing in the names of the songs and not re-typing
    the artist name and album title. Then when I'm done with that album,
    close the form, re-open it and all the fieds would be blank, but once
    I type the artist name and album title of a different CD, the process
    will repeat itself, and I would only worry about inputing each song.

    Thanks for taking the time to help me.

    Mike
  • Patrick

    #2
    Re: Form??

    One way would be to create two global variables and assign the value
    of each field to the variable on the Lost Focus event, then have a New
    Record button that assigns the value of the variables to the fields,
    or you could write the values to a table.
    Patrick

    On 15 Oct 2003 09:50:18 -0700, michael.garcia@ aig.com (Mike) wrote:
    [color=blue]
    >Hello, I created a form with 3 fields. The objective is to input all
    >my CD Albums that I have. The 3 fields are, Artist Name; Album Title;
    >Song Title;...
    >
    >What I want to avoid is inputing the name of the artist and the album
    >title more than once. Example: I open the form type the artist name
    >then the album title, the first song, then go to the next record, and
    >the artist name and album title are already there, so that I would
    >only worry about typing in the names of the songs and not re-typing
    >the artist name and album title. Then when I'm done with that album,
    >close the form, re-open it and all the fieds would be blank, but once
    >I type the artist name and album title of a different CD, the process
    >will repeat itself, and I would only worry about inputing each song.
    >
    >Thanks for taking the time to help me.
    >
    >Mike[/color]

    Comment

    • Bob Quintal

      #3
      Re: Form??

      michael.garcia@ aig.com (Mike) wrote in
      news:8daeee9c.0 310150850.237f5 3b4@posting.goo gle.com:
      [color=blue]
      > Hello, I created a form with 3 fields. The objective is to
      > input all my CD Albums that I have. The 3 fields are, Artist
      > Name; Album Title; Song Title;...
      >
      > What I want to avoid is inputing the name of the artist and
      > the album title more than once. Example: I open the form type
      > the artist name then the album title, the first song, then go
      > to the next record, and the artist name and album title are
      > already there, so that I would only worry about typing in the
      > names of the songs and not re-typing the artist name and album
      > title. Then when I'm done with that album, close the form,
      > re-open it and all the fieds would be blank, but once I type
      > the artist name and album title of a different CD, the process
      > will repeat itself, and I would only worry about inputing each
      > song.
      >
      > Thanks for taking the time to help me.
      >
      > Mike[/color]

      Mike,

      Access has some very simple methods of doing what you propose.
      However, Access is a relational database system and you need to set
      it up properly to do that.

      First I assume that your form is based on a single table. You need
      to split it out to two separate tables.

      The first table, Albums has the following structure:
      AlbumID , type autonumber
      AlbumName, text
      ArtistName, text.

      The second table, Songs has two fields
      AlbumID, number (long Integer)
      SongTitle, text

      Once you have built your tables, you set a relationship between
      them. The relationship in your case is between Albums.REcordID and
      Songs.RecordID, type 1 to many.
      You set relationships from Tools->Relationship s,

      Now you can modify your form to show an album. Remove the song
      textbox from the form, and replace it with a subform based on
      Songs.

      To use the form, navigate to the NewRow Add the Album title and
      Performer, then start adding songs.

      Access will do the maintenance for you.

      Even better, if you notice after entering twenty songs on an album,
      you misspelled the Artist's name, you only need to change it once.

      Bob Q


      Comment

      Working...