ms-access

Nested loop to Iterate Values from/of 2 combo boxes

帅比萌擦擦* 提交于 2019-12-24 06:29:40
问题 I am making a College Admission Management System; there are 2 tables named Categories and Groups. The category contains a field named Category which contains values like 'Army Serving' , Army Retired, Civilian , etc.. while Groups Table has a field named Group that contains values such as Pre-Engineering, Pre-Medical etc.. I am successfully able to preview all lists separately by selecting the category and group from combo boxes in a form, and I am also able to create a Merit list of

Returning the index of a field in a recordset

可紊 提交于 2019-12-24 06:22:55
问题 I have a recordset object generated by the following code. Private Sub GetID_Click() 'first find max id on sheet; used for if no ID is found on sheet Dim myRange As Range Dim maxIdOnSheet As Long Dim clientSheet As Worksheet Set clientSheet = Sheets("Client Codes") Set myRange = clientSheet.Range("A1:A1048576") maxIdOnSheet = WorksheetFunction.max(myRange) + 1 'set up connections with Nina's housing database Dim cmd As New ADODB.Command Dim conn As New ADODB.Connection Dim rs As New ADODB

Returning the index of a field in a recordset

不羁的心 提交于 2019-12-24 06:22:10
问题 I have a recordset object generated by the following code. Private Sub GetID_Click() 'first find max id on sheet; used for if no ID is found on sheet Dim myRange As Range Dim maxIdOnSheet As Long Dim clientSheet As Worksheet Set clientSheet = Sheets("Client Codes") Set myRange = clientSheet.Range("A1:A1048576") maxIdOnSheet = WorksheetFunction.max(myRange) + 1 'set up connections with Nina's housing database Dim cmd As New ADODB.Command Dim conn As New ADODB.Connection Dim rs As New ADODB

Many to Many in Access

爱⌒轻易说出口 提交于 2019-12-24 06:07:09
问题 I'm trying to ether get rid of a real world many-to-many relationship (and just feeling stupid for not being able to) or find the proper way to input it into Access. I've tried several junction table setups and only seem to pass the many-to-many problem on to another table. Here is an abbreviated sample of the two tables: Table 1: Amp_Number Amp_S.Name 103 Rag1 194 Osd4 230 Lew6 321 Ooi4 550 Qwd3 629 Crd5 687 Rab4 879 Pra2 Table 2: Plas_Number Plas_Amp 55 Rab4 82 Osd4 & Qwd3 & Lew6 94 Rab4 &

show duplicate rows in access

僤鯓⒐⒋嵵緔 提交于 2019-12-24 06:03:30
问题 i have this table MEN id | Qty | Place ======================== 111 | 10 | 55 111 | 20 | 66 111 | 10 | 77 222 | 40 | 11 333 | 50 | 11 111 | 10 | 22 222 | 44 | 33 222 | 40 | 44 333 | 15 | 55 i need to show all the records that id=id and Qty=Qty like this: id | Qty | Place ===================== 111 | 10 | 55 111 | 10 | 77 111 | 10 | 22 222 | 40 | 11 222 | 40 | 44 回答1: You can do something like this: SELECT MEN.Id, MEN.Qty, MEN.Place FROM MEN INNER JOIN (SELECT MEN.Id, MEN.Qty FROM MEN GROUP BY

How to solve a syntax error when using this INSERT INTO statement and the .NET OleDb namespace?

…衆ロ難τιáo~ 提交于 2019-12-24 06:01:36
问题 I keep getting an error when I attempt to insert values into a Access database. The error is syntactic, which leads to the following exception: OleDbException was unhandled Syntax error in INSERT INTO statement. private OleDbConnection myCon; public Form1() { InitializeComponent(); myCon = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\File.mdb"); } private void insertuser_Click(object sender, EventArgs e) { OleDbCommand cmd = new OleDbCommand(); myCon.Open(); cmd

Java Application. Undefined function 'replace' in expression

人走茶凉 提交于 2019-12-24 05:57:38
问题 My Java application works well on two of my colleague's computers, however it will not run on mine. The application reads a spreadsheet, creates tables in access from it and then compares them. The application is able to read and create the tables, but will not compare them. The error I am getting is java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Undefined function 'replace' in expression. I have read the other threads on this but wasn't able to gain much insight. Since we

Java Application. Undefined function 'replace' in expression

徘徊边缘 提交于 2019-12-24 05:57:08
问题 My Java application works well on two of my colleague's computers, however it will not run on mine. The application reads a spreadsheet, creates tables in access from it and then compares them. The application is able to read and create the tables, but will not compare them. The error I am getting is java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Undefined function 'replace' in expression. I have read the other threads on this but wasn't able to gain much insight. Since we

Access query to make column that shows checkbox for Yes/No column

五迷三道 提交于 2019-12-24 05:55:22
问题 I've written a query to create a table in MS-access: CREATE TABLE [customers] ([id] NUMBER, [authorised] YESNO); This works fine. However the YES/NO column displays -1 and 0, when I'd really rather a checkbox. Is there any way to do this within the query? 回答1: This is a known bug: ACC2002: Make-Table Query Does Not Format Yes/No or Bit Fields Correctly. The Knowledge Base article proposes two workarounds, unfortunately none of them one can use in a query. 回答2: If this is something you need to

Select data from an ODBC connection into a MS Access database

混江龙づ霸主 提交于 2019-12-24 05:53:50
问题 A little background first. Where I work we have limited access to programming tools. We have access to the Microsoft Office Suite and therefore most of our projects are created in Access even though there are better solutions out there. We recently received access to Visual Studio 2013 and I am interested in converting some of our more heavily used tools into VB.NET projects. I have a good understanding of VBA after using it for so many years, however, converting to VB.NET is definitely a