Questions tagged [vba]

Visual Basic for Applications (VBA) is an event-driven, object-oriented programming language for writing macros, used for the entire Office suite as well as other applications. Questions with this tag should restrict themselves to specific interactions with the database platform. Broader VBA programming questions should be asked on stackoverflow.

Visual Basic for Applications (VBA) is an event-driven programming language which was first introduced by Microsoft in 1993 to give Excel 5.0 a more robust object-oriented language for writing macros and automating the use of Excel. It was introduced to Access, PowerPoint and Word in Office 97. The language and its runtime quickly matured and began being licensed and used in products beyond Microsoft Office applications.

Tag usage

  • If your question is specifically about programming Excel, Access, Word, Outlook, PowerPoint or Project, stackoverflow is the appropriate network to ask on
  • It is expected that questions tagged should either contain VBA code or ask how to use specific VBA code.

Related Tags:

46 questions
5
votes
3 answers

is automated data movement via Excel considered ETL?

I am wondering if informal methods of automatically extracting, transforming, and loaded data constitute "ETL." For example, I code Excel VBA to extract from databases onto a spreadsheet, transform the data into the desired format, and load by…
brietsparks
  • 151
  • 1
  • 4
3
votes
3 answers

VBA Maximize Access Application Main Window

I need my access application window to open up in full screen. I have tried using: DoCmd.RunCommand acCmdAppMaximize and DoCmd.Maximize (which I think only maximizes a Form). Neither is working for me? I put the VBA code in the OnLoad event and I…
Juan Velez
  • 3,303
  • 19
  • 57
  • 75
3
votes
2 answers

Rearranging Data in an MS Access 2007 table into a new table format/Result Output

I have Access tables that have the following format: -------------------------------------- |Name |Math|Science|Reading|Civics| -------------------------------------- |Mike | A | C | A | B | |John | B | A | A | B | |Randy| A …
Juan Velez
  • 3,303
  • 19
  • 57
  • 75
3
votes
4 answers

How to compact the current MS Access database from VBA function

I want to be able to run the 'compact and repair' process from within a VBA module in the database. I have a batch process that I run occasionally, it drops a few old tables, re-imports them from other databases, renames a couple of fields, does a…
ConanTheGerbil
  • 1,303
  • 5
  • 31
  • 50
3
votes
2 answers

PostgreSQL: alternative ways to connect to database

THIS IS A THEORETICAL QUESTION. I am posting it on this site because of this and because I think that database administrators could provide more accurate insight. The line that separates the two sites is still not crystal clear to me so I may have…
Feillen
  • 191
  • 2
  • 4
  • 15
3
votes
3 answers

Access 2010-2016 Compatibility Error

I was just updated to Access 2016, while my users are still at Access 2010. I opened our database in MS Access 2016 once, didn't make any changes, and closed it out, and now all the users are having errors for ANY basic VBA code, including: StrConv…
pblo
  • 31
  • 1
  • 1
  • 5
3
votes
2 answers

Best design for a tree-like structure database

I'm designing a database in MS Access which is used for tracking the locations of a variety of chemical solutions, made in batches. Each batch can be split (aliquoted) practically indefinitely. That is, we may manufacture 100g of a product, which is…
Mark Butler
  • 133
  • 1
  • 6
2
votes
2 answers

Splitting 1 record on one table to become two records on another table

I am REALLY very new to this so please excuse my ignorance, but I could really use some help! I've got two tables: BillsFiled and Authors On BillsFiled, there are the columns: ID, Symbol, Filedate, Type, Author, Title, Summary, among others This is…
2
votes
2 answers

SQL Server: Trigger with UPDATE statement causes deadlocks

I have added a trigger to perform a change tracking mechanism on a table that has a relatively high load. During testing, we encountered no issues but now as it is in production there are deadlocks happening from time to time. There is an old MS…
JannikB
  • 21
  • 2
2
votes
1 answer

Access: Number format for VBA in queries of variant type

Lets say I have two queries like select iif(condition, col, null) from table select f(col) from table where col is a double-valued column f is a VBA-public function(value as double) as variant. Somewhere later, I alter the format of the respective…
Bubaya
  • 155
  • 5
1
vote
1 answer

MS Access query-by-form opening query, but not running it with new form data

I have created a query-by-form in MS Access. The form has a text field for each field in my table. I'm only using one starting out to test. The query criteria for that field is Like "*" & [Forms]![MasterSearchForm]![KeyWords] & "*" Or…
abalter
  • 127
  • 2
  • 8
1
vote
1 answer

VBA @ Access on replacing values on a huge list

I have a question (that's why I'm here actually :P ) about VBA @ MS Access. So, I have a huge database (well, for me it is huge, about 23K+ ID) on shoes. It has 5 columns: ID, Article number, size (mm),pairs (avaliable on stock) and EAC13 codes. It…
1
vote
1 answer

Calculating Open Days field and stopping with status change

I had a question but wasn't sure where I needed to post or view if someone has done this before. I have a dilemma on my hands. Background Info: I have been trying to figure out what to do since I have a form that has a field where I use DateDiff to…
PPK
  • 11
  • 1
1
vote
1 answer

MS-Access Beginner Replace Textbox Caption With Combo Box Selection on Button Press

I'm a complete beginner, just trying out/looking into Databases as more of a hobby, and think Microsoft Access would be an easy way to start with the whole front-end forms and back-end combination. I just have a form with a combo box [UserNameEntry]…
SamuraiMelon
  • 123
  • 3
1
vote
1 answer

How to refer to Field Name with a ? in it in MS Access VBA code

Simple question, but I am new to databases. I have a field called 'ActorRetired?', and in some VBA code I need to set the value of it to -1. But When I try: Me.ActorRetired?.Value = -1 I get the error 'Compile Error: Expected: Expression' with the…
1
2 3 4