Results 1 to 2 of 2

Thread: Adding to MsAccess[RESOLVED]

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2002
    Location
    Denmark
    Posts
    45

    Question Adding to MsAccess[RESOLVED]

    hi can anybody tell me why this wont add to my MsAccess database ???

    Database name is Media.mdb
    and table is DVD the colums is matching titel orginal and so on...



    VB Code:
    1. Dim SQL as String
    2.  
    3. SQL = "SELECT * from DVD"
    4. Set rsShowDVDRS = dbMediaDB.OpenRecordset(SQL, dbOpenDynaset)  'here it says variable not set or variable block not set
    5.  
    6. With rsShowDVDRS
    7.    
    8.     .AddNew
    9.     !Titel = DK_Titel.Text                    'text
    10.     !orginal = Orginal_Titel.Text         'text
    11.     !genre = DVD_Genre.Text            'combo selection text
    12.     !Tid = Tid.Text                              'numbers
    13.     !År = År.Text                                 'numbers
    14.     !reg = kode                                  'numbers
    15.    
    16.     If Titel Or orginal Or genre Or Tid Or År Or reg = "" Then
    17.     MsgBox ("Alle felter skal udfyldes og reg.kode skal vælges")
    18.     Else
    19.     .Update
    20.     MsgBox ("Film data er gemt")      
    21.     OpdaterDVD                            'is a function
    22.     End If
    23.  
    24. End With
    Last edited by Rene Hansen; Oct 9th, 2002 at 03:36 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    On the surface it looks good...

    Do you get an error, or does nothing happen?

    Have you put a STOP on your add code and walked through it?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width