Jump to content

how to update another table at the same command button?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
hanarina21

hanarina21

    Newbie

  • Members
  • Pip
  • 4 posts
i have an error occured in my project when i try to run it..
when i placed the code
"Set RS = Nothing
sql6 = "Update alatan set STATUS_ALATAN = 'Belum di pinjam' where NO_INVENTORI= '" & Text1.Text & "' "
con.Execute (sql6)
Set RS = Nothing
"
the error says that
"microsoft [odbc microsoft access driver ] too few parameters.expected 1.
how can i fix the error?

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
You need an Update before you can set:

UPDATE table SET RS=........


#3
hanarina21

hanarina21

    Newbie

  • Members
  • Pip
  • 4 posts

Jordan said:

You need an Update before you can set:


UPDATE table SET RS=........


thanks 4 the code that you've post.
but i'm not really clear with the code.can you give an example of code about the update command.
thanks..
i need reply from you as soon as possible.

#4
hanarina21

hanarina21

    Newbie

  • Members
  • Pip
  • 4 posts
thanks 4 the code that you've post.
but i'm not really clear with the code.can you give an example of code about the update command.
thanks..
i need reply from you as soon as possible.

#5
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Try this:


"UPDATE tableNameHere Set RS = Nothing
sql6 = "Update alatan set STATUS_ALATAN = 'Belum di pinjam' where NO_INVENTORI= '" & Text1.Text & "' "
con.Execute (sql6)
Set RS = Nothing
"