473,379 Members | 1,191 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Visual Basic 6 Problem in Table

Hi to all.. I was working for now in our project in vb6.
But I have a problem when i run the save button, the message box appeared and says"no values in required parameters."

my code is below:

Expand|Select|Wrap|Line Numbers
  1. Tsql = "UPDATE Tbl_Tithes SET Label11.Caption = '" & Me.txtTithes.Text & " ' where ID LIKE '%" & txtID.Text & "%'"
  2.  
  3.    Call dbConnect
  4.       TConn.Execute Tsql
  5.     TConn.Close
  6.     Set TConn = Nothing
  7.     Unload Me
I knew that the conflict code i have do is in the label11.caption. I use label11.caption because it contains the date that the user will input on the form and save in access. I dont know what to do, someone help me to fixed this problem.
Feb 6 '13 #1
8 1375
Rabbit
12,516 Expert Mod 8TB
The syntax for a simple update statement is this:
Expand|Select|Wrap|Line Numbers
  1. UPDATE tableName
  2. SET tableName.fieldName = someValue
Do you see the problem?

You're trying to update a field named Caption in a table named Label1. You probably have neither. You need to change that to the actual name of the field you want to update.
Feb 6 '13 #2
Thank you so much for your reply I appreciated it so much.

I don’t know on how to update the fieldname in the table that declared in label11.caption..

I want to work this code when the user input the date in the combo boxes then it pass the value to the label11.caption. The Date input by the user is the field name in the table. There is many Fields inside the table containing different dates. It depends on the user on what date he wants to update. After that the user will input the ID of the member and the value of the Tithes then when he clicks the save button, the records will saved in the TithesDB.

I dont know on how to code this so I attached my complete program here. Please check this and inform me what is wrong from my codes.. Thanks in advance.Always Tke Cre and God bless you
Feb 7 '13 #3
Rabbit
12,516 Expert Mod 8TB
In that case, concatenate it the same way you're doing to Me.txtTithes.Text.

As a rule of thumb, I don't download files from strangers.
Feb 7 '13 #4
:-) I think i need to search further. Its hard to explain.. Thanks a lot!
Feb 7 '13 #5
Rabbit
12,516 Expert Mod 8TB
I know what you're trying to do. All I'm saying is that you already have the solution. You're already dynamically supplying a value in your existing code, you just need to do it again.
Feb 7 '13 #6
how can i do it again. can you give me a sample code?
Feb 7 '13 #7
Rabbit
12,516 Expert Mod 8TB
You do realize the code you posted is itself sample code of how to concatenate a value?

I'm not sure why you don't understand since you already wrote code that uses the solution I'm suggesting. What you need is this:
Expand|Select|Wrap|Line Numbers
  1. Tsql = "UPDATE Tbl_Tithes SET " & Label11.Caption & " = '" & Me.txtTithes.Text & " ' where ID LIKE '%" & txtID.Text & "%'"
Feb 7 '13 #8
Hello Rabbit!! I try to run your given code. And you know what its works great. My codes is running smoothly. I am very grateful for your help.Thanks a lot for your Understanding.more power. God Bless you ('_')
Feb 7 '13 #9

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

Similar topics

2
by: Norm | last post by:
I have run into problems from time to time (and this is one of those times) using visual basic to access an external database and perform a basic select from statement. When the table is extremely...
8
by: delete table with Visual Basic 6 | last post by:
Dear developer, I have an error message when I try to delete or drop Microsoft Access XP table with ADOX in Visual Basic 6. I use the ADOX.Catalog and ADOX.table to create and delete or drop table...
3
by: Ben | last post by:
Hi everyone, Now I am using Visual Basic.net to write a program but having some headaches. The situation is as follows: I am using ODBC connection to connect one database( non-SQL server) ,...
0
by: rodneybauer1 | last post by:
hello: thanks in advance for any responses. i dont have a isp at home so have to use public library computer. will check this every couple days though. im using visual basic.Net windows XP with...
1
by: Tom Rahav | last post by:
Hello all! I develop application in Visual Basic .NET and ORACLE database. My question is how do I "send" script file to the database using visual basic .net. Other words, is there any way to...
4
by: Volumstein | last post by:
Hello, I am spoiled coming from programming in word and excel which offer the "record macro" tool that eliminated most basic syntax confusions that I had. unfortunately msaccess doesn't offer...
2
by: Ryan McBride | last post by:
Once again at my wonderful job i've been given the task of "come teach your fellow idiot coworkers the skills you have" I write software for a company in chicago. I use visual basic on asp.net...
6
by: Vince | last post by:
Hello all, I am using Visual Basic to open a saved query and then save information in the query to an array for later use. The problem is that the same query shows different results when opened...
1
by: nitdesh | last post by:
Hi , I have Just Registered to This Site and Deeply Require a Help For my Software . I am Into Warehousing Business I Have Front End as Visual Basic 6.0 and Backend as SQl 7.0 Database ...
5
by: CAM | last post by:
Hello, I am using SQL Server Express 2008 for my database and Visual Studios 2008 - Visual Basic.Net for my forms. I Gone into VS 2008 and specify the source of data using the Data Sources...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.