ms-access

Passing Values Between Forms using OpenArgs

回眸只為那壹抹淺笑 提交于 2019-12-24 10:26:36
问题 *****EDITED So I have a form titled "NewInvoice". This form edits a table "Invoice" which contains the following; Invoice Number, Customer, Order Date. In this form I have a button which opens a subform titled "InvoiceItem". This edits a table with the same name that contains Invoice Number, Item Code, Dimensions, Etc. Now currently, my button has an event procedure as follows. Private Sub CreateInvoiceItem_Click() DoCmd.OpenForm "InvoiceItem", OpenArgs:="InvoiceNumber" End Sub (The reason I

Continuous sequences in SQL

感情迁移 提交于 2019-12-24 10:23:55
问题 Having a table with the following fields: Order,Group,Sequence it is required that all orders in a given group form a continuous sequence. For example: 1,2,3,4 or 4,5,6,7. How can I check using a single SQL query what orders do not comply with this rule? Thank you. Example data: Order Group Sequence 1 1 3 2 1 4 3 1 5 4 1 6 5 2 3 6 2 4 7 2 6 Expected result: Order 5 6 7 Also accepted if the query returns only the group which has the wrong sequence, 2 for the example data. 回答1: Assuming that

How do i create a query that will give me a cumulative total?

末鹿安然 提交于 2019-12-24 10:23:08
问题 I have a table with the following columns: reportDate DATETIME and losses CURRENCY and of course the ID column. How do I write a query that will return a table with a running total of the losses column? Each date will have multiple entries so i think they will need use Sum() for each date. I know this has to do with the DSum function but im still lost on this one. It should look something like Month Losses Cum ----- ------ ----- Jan $3,000 $3,000 Feb $2,000 $5,000 Mar $1,500 $6,500 Having a

Calling Access Sub from Excel

爱⌒轻易说出口 提交于 2019-12-24 10:19:36
问题 I'm trying to call a subroutine in an Access database from Excel. This sub then call a number of other subroutines, all contained within the database. I saw a number of other posts where this was discouraged, but for reasons, Excel needs to be the front-end for this. I tried: Sub TestRun() Dim acObj As Access.Application Set acObj = CreateObject("Access.Application") acObj.Application.Visible = True acObj.OpenCurrentDatabase "C:\testMDB\TEST.mdb", False, "password" acObj.Application.Run (

Many-to-many relation ship with form-based multi selection

北城以北 提交于 2019-12-24 10:09:21
问题 I am creating a database and I need to construct a form-based entry method of adding data into my tables, whilst maintaining what I believe is a many-to-many relationship. Say Project X can have Parts X, Y and Z - and Parts X, Y and Z can be used on more than one project. What is the best way of allocating a list of 'parts' to a project through a form, without have a huge array of tickboxes, and how do I construct my tables to accommodate this? Much appreciated. 回答1: Many-to-Many relationship

Using access database in php

对着背影说爱祢 提交于 2019-12-24 10:03:06
问题 I built a stock manager on VB.NET, it uses a MS Access Database. I also built a website, and on this website I want to relularly upload the updated MS Access database file onto the website and insert it into the mySql Database. Now my problem is I dont know how to access the MS Access file using php, im sure theres a way without buying those softwares, but i cant find it. Now I not bound to this scenario, if someone has better ideas i would appreciate it, most importantly I want the stock

Using SQL Server specific code in Access linked to SQL Server database

穿精又带淫゛_ 提交于 2019-12-24 10:02:48
问题 I have an access file that is linked (through an ODBC connection) to a SQL Server 2008 database. I am trying to write some reports against this database. However, Access chokes when I write the select query of the report with SQL syntax specific to SQL Server that doesn't exist in access. Shouldn't this work, since it's the SQL Server engine running the queries and just sending the data back to Access to display? Is there any way to get this to work? Need this to work on any combination of

MS Access query check if form field is empty

假如想象 提交于 2019-12-24 09:59:51
问题 I have a multi-field form and use it to retrieve records of a table. If there is no user input in a field I want to allow "*" and Null Values for the according column, the user input otherwise. I tried Like IIf([Forms]![frm_searchForm]![Titel]="" Or IsNull([Forms]![frm_searchForm]![Titel]);Like "*" Or Is Null;[Forms]![frm_searchForm]![Titel]) as well as Like IIf(IsEmpty([Forms]![frm_searchForm]![Titel]);Like "*" Or Is Null;[Forms]![frm_searchForm]![Titel]) But in both cases, the IIf function

SELECT query to return a row from a table with all values set to Null

这一生的挚爱 提交于 2019-12-24 09:52:07
问题 I need to make a query but get the value in every field empty. Gordon Linoff give me the clue to this need here: SQL Empty query results which is: select t.* from (select 1 as val ) v left outer join table t on 1 = 0; This query wors perfectly on PostgreSQL but gets an error when trying to execute it in Microsoft Access, it says that 1 = 0 expression is not admitted. How could it be fixed to work on microsoft access? Regards, 回答1: If the table has a numeric primary key column whose values are

Rookie SQL inside of VB question - MSAccess 2003

旧时模样 提交于 2019-12-24 09:49:02
问题 Hey guys, can anyone help me with a simple question. I have this SQL statement below in a sub in VB within access from a button click, and I am new to this. Here is what I typed: Private Sub Command0_Click() Dim rs As Recordset Dim sql As String Dim db As Database Set db = CurrentDb sql = "SELECT * FROM Transactions" Set rs = db.OpenRecordset(sql) Do Until rs.EOF rs.MoveNext Loop If Not rs.EOF Then MsgBox "test" End If End Sub Ok, so how do I populate this?? Essentially I am justing starting