ms-access-2010

Keep listbox selection the same after closing and reopening

时光毁灭记忆、已成空白 提交于 2019-12-12 01:49:22
问题 I have a listbox in Access with the ability to select from three items. When I close the database the listbox does not save the item which I selected, but reverts back to the first item in the list of three. How can I save the selection I made when I close and reopen the database. I know there is a way to have a default selection, but I'd like to keep my latest selection, instead of it reverting to the default. Thank you. 来源: https://stackoverflow.com/questions/28676459/keep-listbox-selection

Non Recordsource - Does not update with the row

可紊 提交于 2019-12-12 01:41:00
问题 I have a form that i am using to input information into a table. Table Definition: Field0 - AutoNumber Field1 - Text Field2 - Number (Loose Referential Integrity) Field3 - Number (Loose Referential Integrity) Control - Record Source: TextBox - Field1 ComboBox1 - `Unbound` ComboBox2 - Field2 ComboBox3 - Field3 In regards to the Form: New Record - ComboBox1 defines the selections available in ComboBox2 Edit/View Record - ComboBox1.Value is deduced by the ComboBox2.Value Originally, this Form

Need helping making a multi table query in access

我只是一个虾纸丫 提交于 2019-12-12 01:24:33
问题 This is the SQL code I have at the moment, what can I do to fix it because when I try to run it it says Type Mismatch in expression SELECT tblCustomers.CustomerID, tblCustomers.Lastname, tblCustomers.Firstname, tblCustomers.AddressLine1, tblCustomers.Phone, tblOrders.OrderID, tblOrders.CustomerID, tblOrders.NumberOfCDs, tblOrders.OrderDate, tblOrders.PaymentType, tblOrders.AmountPaid, tblOrders.Discount, tblOrders.OrderSent FROM tblCustomers INNER JOIN tblOrders ON tblCustomers.CustomerID =

calculate how many weekend days inside date?

别等时光非礼了梦想. 提交于 2019-12-12 01:08:21
问题 I need to calculate how many weekend days inside 2 dates? what I mean is that I have 2 dates and want to know the count of Saturdays & Sundays between these dates. I have the 2 dates on each record (from date - to date) and want to query the count of weekends. 回答1: The following VBA function will allow you to run Access queries of the form SELECT CountWeekendDays([from date], [to date]) AS WeekendDays FROM YourTable Just create a new Module in Access and paste the following code into it:

ACCESS 2010 / SQL: How do you copy a row which has an attachment field?

只愿长相守 提交于 2019-12-11 23:51:38
问题 I want to run a SQL query to copy a row from my table to either the same table or another table. Whichever method I use, I end up with a message telling me something similar to "You can't run an INSERT INTO query if it contains a multi-value field" (translated from french) I tried using SELECT * INTO, but the result is the same. My table is about reports, which can have a revision (hence the row copy), and they can have an attachment like for ex. a pdf file. so, how do you / can you copy a

Delete Records from Table Before Delete Trigger

℡╲_俬逩灬. 提交于 2019-12-11 23:44:38
问题 I know that in MSSQL when you load a trigger onto a table, that you have access to a "cache table" of the record(s) to be operated on (Update, Insert, Delete). Is there a similar mechanism to utilize from Access? If not, if i want to enforce a 1:1-M from a base table to the Join Tables, how would i do this? Tried using their "Oh so useful" Relationship Schema, but since i cant find a "unique" index for the PK's i setup and indexed, i cant use the trickle-down delete portion of the Enforce

Access VBa - loop through Excel columns

我只是一个虾纸丫 提交于 2019-12-11 23:28:11
问题 I'm having troubles with looping through Excel file from Access. Here is my code: Sub Xceltest() Dim XcelApp As Object Dim XcelBook As Excel.Workbook Dim x, i Set XcelApp = CreateObject("Excel.Application") XcelApp.ScreenUpdating = False Set XcelBook = XcelApp.Workbooks.Open("C:\Users\Lucky\Desktop\Test\Sample.xlsx") With XcelBook i = XcelApp.Rows(1).Find(What:="Število", LookIn:=xlValues, Lookat:=xlWhole).Column x = XcelApp.Range(XcelApp.Cells(1, i), XcelApp.Cells(XcelApp.Rows.Count, i).End

DSUM in Access query yields Nulls in random records

不想你离开。 提交于 2019-12-11 22:22:19
问题 I have a query (in MS Access 2013) that gives me the Sales for various Items by Date, for each day for the next 12mo. In another table, I have each Item with its known purchasing leadtime, say between 30 and 90 days. I created a query, and for each Item, I calculated the future date according to the leadtime, using: FutureDate: DateAdd("d",[Leadtime],Date()) I validated all Items exist in the Sales query, and all FutureDates are within the records that exist in Sales. I need to calculate the

Splitting and exporting multiple tables from MS Access

时光怂恿深爱的人放手 提交于 2019-12-11 21:14:50
问题 I'm hoping there is a fairly easy answer to this question. Perhaps using VB. I have a table in access called 'customers'. Each customer has an assigned franchise name in a column called 'franchise' on this table. I need to supply all franchises a csv file containing all the customers assigned in their franchise from the customer table. The long winded way would be an individual query for each franchise(select * from customer where franchise = 'New York'), but there are over 50 different

sql join from microsoft access table to another table through odbc using pass through query

≡放荡痞女 提交于 2019-12-11 21:07:57
问题 So i have a very large data set on a server that i need to shrink. I have a list of names in a table locally on my computer with ms access. I want to create an inner join from my small local table to this huge server table. I was thinking I would just do a pass through query in ms access and inner join the two tables, but when i do a pass through query MS access can't find my local table (it only recognizes the tables on the server). How can i join the two? Here is my current code: select