ms-access

MS Access VBA call sub works on the first pass but not on the second

被刻印的时光 ゝ 提交于 2020-01-25 08:39:21
问题 I have hit a wall and I am completely at a loss. So I have a Form in MS Access. In it I have a single text box and a single button. When I type in a number in the text box and then click the button it opens a public sub which then runs a few queries, updates the database, displays a text box and then clears out the text box. This all works perfectly. My issue is trying to do the exact same thing with hitting enter in the text box. The strangest thing is that the code works fine right after I

Make fields visible in MS Access form as certain fields are completed

时光怂恿深爱的人放手 提交于 2020-01-25 08:08:21
问题 I am building a form In MS Access for users to input data but there are too many possible fields. Most of the time only about half the fields will be used. I thus would like to have certain fields appear only depending on what the user inputted on a prior given field. Ex: user enters project number, title, then he checks a "yes/no" engineering. since he checked it this means engineering is impacted so a dozen fields that the user will have to fill out appear. Is this possible: 1)without VBA 2

How to make a Public Function return SUM value based off current Month in ms access 2016

二次信任 提交于 2020-01-25 08:05:13
问题 I have this code that i am trying to use however when the query calls it it returns a blank column of data. so on it i am trying to add the number value in each column and adding a new column each month with the math formula. Option Explicit Public Function FCalcMnthALLTDISTRIB() Dim OCT As String Dim NOV As String Dim DEC As String Dim JAN As String Dim FEB As String Dim MAR As String Dim APR As String Dim MAY As String Dim JUN As String Dim JUL As String Dim AUG As String Dim SEP As String

Syntax error in update using C# inputting data into an existing row

谁说我不能喝 提交于 2020-01-25 06:57:26
问题 I am having problem with my code with the update query it shows the error syntax error in update statement. I would like to insert in data into an existing row with the columns already created. private void save_care_Click(object sender, EventArgs e) { if (textBox2.Text=="") { //Checking if workorder exist in database connection.Open(); OleDbCommand checkrecord = new OleDbCommand("SELECT COUNT(*) FROM [c# barcode] WHERE ([Workorder] = @workorder)", connection); checkrecord.Parameters

How to automaticaly calculate a new field (Column) in MS Access DB 2016 each month

孤人 提交于 2020-01-25 06:38:09
问题 I'm using MS Access 2016 on a win10 platform. I have a table in Access tbl_OB_PLAN_ALLT_DISTRIB that has the months of the year as headers example: OCT , NOV , DEC , etc.. I have a query that calculates the total of the months dollar value for all my Organizations that money is sent to. I am needing help modifying my code in my query to automatically add the next month field to that calculation. I currently have to go in the query and modify it every month. Here is what I am using so far: OB

Combine multiple fields with condition

点点圈 提交于 2020-01-25 05:35:26
问题 I have multiple MS Access fields and I need to combine most of them with a condition. I'm still a beginner with complicated SQL queries thus the limitation to translate the following pseudocode into reality: SELECT field_1, field_2, field_3 CREATE new_field // these would be WHERE-queries if field_1 & field_2 are "missing", "unknown" or empty then new_field = field_3 else if field_2 & field_3 are "missing", "unknown" or empty then new_field = field_1 else if field_1 & field_3 are "missing",

Using text in a column of Date/Time type in access

那年仲夏 提交于 2020-01-25 04:29:24
问题 I have a column in MS Access in which the data could be any of the following: A date Text string: "n/a" Text string: "n/e" The vast majority of entries will be dates but a very few will need to be these specified text strings. I would like to still be able to perform date calculations on the column. Whats the best datatype to use? 回答1: In my opinion the best approach would be to leave the date field as Date/Time and then add another field to indicate the status if the Date/Time field is Null.

Create a dynamic “checkbox” query in Access for end users

末鹿安然 提交于 2020-01-25 04:20:26
问题 Use-Case Scenario I have a client with low-income residents. These residents can fill out a paper form with a bunch of check boxes. It has one section for "Education" (GED, diploma, associates, etc) and another for "Skills" (HVAC, plumbing, etc) Employers reach out to my client, and for example ask for all their HVAC trained residents with a GED. Right now, they manually comb through paper records looking for a match Solution So far I am setting them up with an access database. We have short

Force MS Access to send full query to SQL server

半世苍凉 提交于 2020-01-25 04:14:05
问题 tl;dr I am using MS Access to query data from a MS SQL Server DB via ODBC. I built a query using the Access editor and it takes forever. While running, the CPU, RAM and I/O values are extremley low. If I click on the Pass-Through button and rewrite the query to be SQL, then it takes only a few minutes. While running the MS SQL server uses a lot of CPU, RAM and I/O (as desired and expected). My conclusion is, that Access does not provide the MSSQL server with the full query but probably does

How to Properly Create a SQL Query

被刻印的时光 ゝ 提交于 2020-01-25 03:59:08
问题 Good Afternoon, I am working on a database for someone that tracks the vehicles they use in their business. Due to vehicles having new license plates issued to them as they expire the business wants to track the current plate for each vehicle as well as all plates that were previously issued to each vehicle. I have created a table for vehicles, tbl_vehicles. I have also created a table for license plates, tbl_license_plates. Being that each vehicle has multiple license plate records. I need