ms-access

Changing a tabledef .connect property in VBA

北城余情 提交于 2020-08-27 07:11:05
问题 I am trying to do something that I have done a hundred times, but it suddenly won't work. acc.AutomationSecurity = msoAutomationSecurityLow 'Remove Security Prompt acc.OpenCurrentDatabase path & "Year " & Range("yr") & "\" & Range("yr") & Range("mo") & "\Year " & Range("yr") & Range("mo") & " GENERIC DB NAME.mdb", True 'update link acc.CurrentDb.TableDefs("TABLE NAME").Connect = "MS Access;DATABASE=" & path & "Year " & Range("yr") & "\" & Range("yr") & Range("mo") & "\Year " & Range("yr") &

How to query Microsoft Access Database fields from VBA in Excel

前提是你 提交于 2020-08-26 10:09:30
问题 I am currently writing a program to save stuff entered in a form in Excel into a database in Access. I am trying to increment a primary key field within Access by "1" whenever I add data from the fields in my Excel form. Because I have declared this field as a PRIMARY KEY NOT NULL field, it doesn't allow me add another row of data unless the primary key field has been declared. I do not want the user to enter the PK data, as that would be silly. How would I go about doing DDL from Excel into

How to query Microsoft Access Database fields from VBA in Excel

陌路散爱 提交于 2020-08-26 10:07:09
问题 I am currently writing a program to save stuff entered in a form in Excel into a database in Access. I am trying to increment a primary key field within Access by "1" whenever I add data from the fields in my Excel form. Because I have declared this field as a PRIMARY KEY NOT NULL field, it doesn't allow me add another row of data unless the primary key field has been declared. I do not want the user to enter the PK data, as that would be silly. How would I go about doing DDL from Excel into

Load CSV to .mdb using pyodbc and pandas

a 夏天 提交于 2020-08-26 04:58:07
问题 Background story: I work on finance (not a developer, so help is very appreciated), my department currently relies heavily on excel and vba to automate as much as possible of our tasks. The company just validated a python distribution and we're now allowed to use it, so I just thought on giving a try. Challenge: My first challenge was to load a CSV file into a MSAcess database (because not all of us are tech savy enough to work purely using dev tools and DBs, so need to make things easy for

Access DB - Save file location (full) link/path in one field and file name in other field (both or either should be clickable to open the file)

只谈情不闲聊 提交于 2020-08-20 04:31:23
问题 This is my first post and I am new to MS Access with no coding experience. I have a Access Database with a table call Attachments with field as "Saved Path" & "File Name". Both are Hyperlink data type. Since there is limit of 2GB under MS Access attachments option, I would like to save a link to the file saved outside of MS Access. What I am looking for is, when a user click on Saved Path it opens a windows dialogue box and user select the file (already created and saved under a network path)

Access DB - Save file location (full) link/path in one field and file name in other field (both or either should be clickable to open the file)

狂风中的少年 提交于 2020-08-20 04:30:13
问题 This is my first post and I am new to MS Access with no coding experience. I have a Access Database with a table call Attachments with field as "Saved Path" & "File Name". Both are Hyperlink data type. Since there is limit of 2GB under MS Access attachments option, I would like to save a link to the file saved outside of MS Access. What I am looking for is, when a user click on Saved Path it opens a windows dialogue box and user select the file (already created and saved under a network path)

Generate a UNIQUE string made out of numeric / ALPHABET

六月ゝ 毕业季﹏ 提交于 2020-08-12 00:58:58
问题 My Problem I don't know any VBA Need to generate a string of 12 chars (ALPHA + numbers , 0-9 , A-Z) IN VBA... Sample output : "ADF3V3224K1WQ" (12 characters long , Higher caps Alphabetical letters , and Numeric values aswell). Story I'm having a hard time figuring out how to create a string generator (didn't say it has to be random, but it 100% has to be unique, meaning it has to check for duplications or store existing values), I have no experience with VBA. I already found a similar post

Generate a UNIQUE string made out of numeric / ALPHABET

﹥>﹥吖頭↗ 提交于 2020-08-12 00:57:12
问题 My Problem I don't know any VBA Need to generate a string of 12 chars (ALPHA + numbers , 0-9 , A-Z) IN VBA... Sample output : "ADF3V3224K1WQ" (12 characters long , Higher caps Alphabetical letters , and Numeric values aswell). Story I'm having a hard time figuring out how to create a string generator (didn't say it has to be random, but it 100% has to be unique, meaning it has to check for duplications or store existing values), I have no experience with VBA. I already found a similar post

Rearranging the tab order of fields in a sub form in data sheet view

拟墨画扇 提交于 2020-08-11 18:43:33
问题 This is an ongoing problem, and I'm hoping there is just a property that I'm missing. Scenario: I have a form that contains subforms. The Default View property for the subforms is set to Datasheet. (The main form is set to Single Form). Due to changes in what I'm tracking, I want to include another field that wasn't part of the original record source. So, I changed the record source (a query) and added the field to the subform. The new field is added to the end of the Datasheet view by