Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How Do You Insert Record In A Blank Table Of MS ACCESS Through VB6 Give Full Source Code Please?

0
Posted

How Do You Insert Record In A Blank Table Of MS ACCESS Through VB6 Give Full Source Code Please?

0

To insert a record into a table (let’s all it tblX) you must insert at least one field value (plus foreign key values in a related table) The steps are to create an SQL string and then use the DoCmd. For two fields it looks like strSQL = “INSERT INTO tblX (field1, field2) VALUES (value1, value2);” DoCmd.RunSQL strSQL Where value1 is the data to be inserted into field1. String data must be delimited by ‘single quotes’ and dates constants must be delimited by #hash signs#. You can combine the two statements into one, but I generally like the option to put a breakpoint at the DoCmd line to check the SQL, so I keep it at two statements.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123