Update access database through excel

  • Thread starter Thread starter tinybears
  • Start date Start date
T

tinybears

Hey can someone help me with forming a code. I have some userforms in
Excel and an access database. I want:

If Ticker already available in database(access) (help with this
please)
Messagebox("Already available")
if Yes then
Messagebox("Do you want to overwrite the data?", VbYesNo)
if yes then
'delete the records and write back the new records(help
with this please)
else unload Userform
end if
else 'my regular code
else
'my regular code
end if

thx a lot. I'm becoming desperate with this problem.
If someone needs my code I'm glad to send you my whole workbook. It's a
workbook for forming financial ratio's for stocks and also graphs and
such.

thx
 
Are you saying that you're wanting to do this in your Excel application? If
so, I'd suggest asking in a newsgroup related to Excel, such as
microsoft.public.excel.programming
 
In my VBA code in Excel. In the Excel group I got the answer that I
should ask it here lol.
 
Odd, since you're programming in Excel and not even using Access (you're
using Jet, the database engine)

Normal way to determine whether a particular piece of data exists in the
database is to create a recordset that returns information to your program.
Since you're going against a Jet database, using DAO in your Excel
application makes the most sense (DAO was developed specifically for use
with Jet databases), although you could use ADO if you prefer.

Without knowing anything about your tables, it's not possible to give you a
more specific answer.
 
Back
Top