0

good day, i would like to ask if it is possible to update a specific cell in ms access using visual basic. If it is possible, may i ask what would be the syntax to be used? Thanks!

Ken White
  • 123,280
  • 14
  • 225
  • 444
Iza
  • 85
  • 2
  • 12
  • Access doesn't have "cells". You're going to need to be much more specific with your question if you're going to get help here. – Ken White Feb 19 '14 at 02:34

1 Answers1

0

Yes, it is possible.

The syntax would simply be an Update Query.

When you say "..using visual basic". I am interpreting that as using Visual Basic for Applications. Am I correct?

You can either create the query using QBE, and pass in the parameters in the Criteria field within the query.

You could then run the query via code:

DoCmd.OpenQuery "YourQueryName"

MS Reference

If that's not your preferred way, you need to look into constructing SQL strings into VBA. Check out this StackOverflow question. String concatenation in VBA is different than just writing SQL in Access.

Hope this helps.

Community
  • 1
  • 1
Mark C.
  • 6,332
  • 4
  • 35
  • 71