By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

Error UPDATE query doesn't contain Multi Value Field

P: 2
This is what I am working on. When patients count is 0, it works, but when it is increased, suppose 1, it gives an error: "An UPDATE or DELETE query doesn't contain Multi Value Field." What's the problem, Please help me out. Thank you very much.





Expand|Select|Wrap|Line Numbers
  1. rs = New ADODB.Recordset
  2.         With rs
  3.             .Open("Select * from Doctor where DName='" & cmbDoctors.Text & "'", cn, 2, 3)
  4.  
  5.             If .Fields("Patients").Value = 10 Then
  6.                 MsgBox("All appointments had been taken. Please Select another Doctor.")
  7.                 Exit Sub
  8.             End If
  9.             patient = Txtname.Text
  10.             If .Fields("Patients").Value = 0 Then
  11.                 .Fields("Patient0").Value = patient
  12.             ElseIf .Fields("Patients").Value = 1 Then
  13.                 .Fields("Patient1").Value = patient
  14.             ElseIf .Fields("Patients").Value = 2 Then
  15.                 .Fields("Patient2").Value = patient
  16.             ElseIf .Fields("Patients").Value = 3 Then
  17.                 .Fields("Patient3").Value = patient
  18.             ElseIf .Fields("Patients").Value = 4 Then
  19.                 .Fields("Patient4").Value = patient
  20.             ElseIf .Fields("Patients").Value = 5 Then
  21.                 .Fields("Patient5").Value = patient
  22.             ElseIf .Fields("Patients").Value = 6 Then
  23.                 .Fields("Patient6").Value = patient
  24.             ElseIf .Fields("Patients").Value = 7 Then
  25.                 .Fields("Patient7").Value = patient
  26.             ElseIf .Fields("Patients").Value = 8 Then
  27.                 .Fields("Patient8").Value = patient
  28.             ElseIf .Fields("Patients").Value = 9 Then
  29.                 .Fields("Patient9").Value = patient
  30.             End If
  31.             .Fields("Patients").Value += 1
  32.             .Fields("Fees").Value += txtAmount.Text
  33.             .Update()
  34.             .Close()
  35.         End With
Jun 1 '13 #1
Share this Question
Share on Google+
3 Replies


P: 56
can u show the update() query
Jun 1 '13 #2

P: 2
According my information, Update is stored query, used to update fields in database. But I'm not sure.
Jun 1 '13 #3

Oralloy
Expert 100+
P: 983
You should be able to look at the database and see all of the stored queries. I'm assuming it's Access, from the way you're writing your code.
Jun 1 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.