ms-access-2010

Using @@IDENTITY in a multi user environment

…衆ロ難τιáo~ 提交于 2019-12-11 20:36:07
问题 The SELECT @@IDENTITY statement in Access VBA, would allow one to view/obtain the AutoNumber that has been generated in a table, for which a record has just been inserted, on the database. This is somewhat easy to track and maintain, if there is just one user and only one INSERT takes place at any moment of time. My application is multi user, so far only one person used to do data entry. Now we have two people and when one user (Mr Brown) inserts a record (Auto ID : 1234 ) and within a second

How to insert several fields into a table using ADO when two of the fields contain commas

若如初见. 提交于 2019-12-11 20:27:35
问题 I have an ado created recordset in access 2010 it returns 9 different fields from a stored procedure on sql server 2008 r2. I am trying to use this recordset (which does populate) to insert all of the records into a table that matches the output. My issue is that two of the fields are name fields that have commas in them. For example Smith, Joseph-- I need to insert that comma into the appropriate field. Right now it throws an error because of the comma in the field. Here is the code that I

how to link to access database file in created .exe file with c#

ぐ巨炮叔叔 提交于 2019-12-11 19:34:26
问题 I want to create setup file for my C# project. I use access 2010 with my project. I link to database file in every form of my project. This my database link OleDbConnection db_con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\HUNAR\Desktop\Bashi Nawxoyy\Bashi Nawxoyy\bin\Debug\db_file.accdb;Jet OLEDB:Database Password=RTm$&9sdfZXC;Persist Security Info=True"); know in creation of setup file I want to config access database file in app.config file and call it

one combobox cannot add all it's items into ms access database

可紊 提交于 2019-12-11 19:18:49
问题 > [i want to add all combobox item in msaccess database] i want to do this i want to add every items of one combobox into msaccess database for e.g. i want to do that my combo has 4 fields one,two,three,four and database has four fiels route1,route2,route3,route4...i want to set as route1=one, route2= two....etc. and if i added 2 items in combobox then remaining two doesnt remainig blank. if(e.getSource()==btn_save) { try{ Connection con; DriverManager.registerDriver(new sun.jdbc.odbc

Using an update statement for Access database (VB 2008)

一世执手 提交于 2019-12-11 18:09:13
问题 I'm trying to create an update statement for my program that will update a database using SQL based on the data the user inputs, unfortunately I have the problem that I can only update one column at a time and sometimes none of them work. I am aware that this function is very basic and not very secure against attacks, but it is a small project that I am making. Unfortunately I only have basic programming skills so I am having trouble getting this part to work. If any help could be given it

Zero Length String Microsoft Access

本小妞迷上赌 提交于 2019-12-11 17:03:17
问题 In excel, I have a text string, which contains numbers and text, that I strip the numbers out of with a formula. However, sometimes it is possible that the text string will be blank to begin with so if this happens I use "" to return a blank instead of a 0. When I link this excel sheet to an access database it will not let me format this column as currency because it is picking up the "" as text along with the stripped out numbers as numbers. Any solutions on how to fix this? Is there another

VBA Access writing data from SQL server to the Access DB

◇◆丶佛笑我妖孽 提交于 2019-12-11 16:24:36
问题 Im trying to open a SQL stored procedure, which contains a Select top 5* form table, and load the data into an Access table called Table3. How do I set the Command Object ActiveConnection property to use the current Access DB? when I provide it with an actual connection string, it says that the user has locked it. At the moment, it runs and prints prints out the results but it does not insert the values. It does not give me an error either. 'Use this code to run the SP and extract all the

How to force the update of an Access combobox?

大兔子大兔子 提交于 2019-12-11 15:00:41
问题 Is there a technique I'm overlooking when coding my form? I have a pair of cascading combos. ComboSource filters the options available for choice in ComboInformation ComboInformation sets the contents of a mandatory field in a table The rowsource for ComboSource is: SELECT tblSource.SourceID, tblSource.Source FROM tblSource ORDER BY tblSource.Source; The rowsource for ComboInformation is: SELECT tblInformation.InformationID, tblInformation.SourceID, tblInformation.InformationSelector FROM

SQL Query ignores controls that it refrences

ぐ巨炮叔叔 提交于 2019-12-11 14:35:50
问题 I have an Access Form that contains a ListBox that gets data from the following query: SELECT tblFUNDS.MorningsStar_Fund_Name, tblFUNDS.ISIN, tblFUNDS.RDR AS [Retro Frei], tblMorningstar_Data.[DEU Tax Transparence], tblMorningstar_Data.[Distribution Status], tblISIN_Country_Table.Country FROM (tblFUNDS INNER JOIN tblISIN_Country_Table ON tblFUNDS.ISIN = tblISIN_Country_Table.ISIN) INNER JOIN tblMorningstar_Data ON (tblFUNDS.Fund_Selection = tblMorningstar_Data.Fund_Selection) AND (tblFUNDS

Multiple text filters in Microsoft Access 2010

牧云@^-^@ 提交于 2019-12-11 13:55:40
问题 I would like to filter through my data with two text boxes, StaffTotalSearchText1 and StaffTotalSearchText2. I understand that only the most recent DoCmd.ApplyFilter command appies, and that means I don't know how to apply two text filters. Edit: Solution found - see Johnny's RecordSource code One way of applying a filter is to do it do the loaded data (RecordSource) - still allowing a "DoCmd.ApplyFilter" to be used. I've created a "lock filter 1" button. When enabled, the filter applies;