ms-access

Create table with access VBA and format fields

[亡魂溺海] 提交于 2021-02-20 04:37:51
问题 I want to create a table using access vba with formatted fields. How do I format currency field with "standard" format while creating the table? Private Sub CreateTable_Click() DoCmd.RunSQL "CREATE TABLE Test( " & _ "[id] AUTOINCREMENT PRIMARY KEY, " & _ "[transaction_date] DATE, " & _ "[reference] TEXT(255)," & _ "[details] TEXT(255)," & _ "[debit] CURRENCY," & _ "[credit] INT);" End Sub 回答1: We use DAO for this. Here's an example. At the bottom, a Format is assigned to a field: ' Creates

Create table with access VBA and format fields

走远了吗. 提交于 2021-02-20 04:37:06
问题 I want to create a table using access vba with formatted fields. How do I format currency field with "standard" format while creating the table? Private Sub CreateTable_Click() DoCmd.RunSQL "CREATE TABLE Test( " & _ "[id] AUTOINCREMENT PRIMARY KEY, " & _ "[transaction_date] DATE, " & _ "[reference] TEXT(255)," & _ "[details] TEXT(255)," & _ "[debit] CURRENCY," & _ "[credit] INT);" End Sub 回答1: We use DAO for this. Here's an example. At the bottom, a Format is assigned to a field: ' Creates

Access Attachment Dialog Window

流过昼夜 提交于 2021-02-20 02:33:03
问题 I am trying to open the window pictured in the following link using a commmand button in a form. Is it possible that anyone can show me how to do that? http://www.utteraccess.com/forum/Launching-Attachments-Dia-t1652872.html Thank you in advance! 回答1: I am not sure if you can call this specific dialog, but what you can do is use the generic FileDialog with the FilePicker option. Then save use that path to the file and copy the specific file to a shared location (probably somewhere where your

Access Attachment Dialog Window

断了今生、忘了曾经 提交于 2021-02-20 02:29:36
问题 I am trying to open the window pictured in the following link using a commmand button in a form. Is it possible that anyone can show me how to do that? http://www.utteraccess.com/forum/Launching-Attachments-Dia-t1652872.html Thank you in advance! 回答1: I am not sure if you can call this specific dialog, but what you can do is use the generic FileDialog with the FilePicker option. Then save use that path to the file and copy the specific file to a shared location (probably somewhere where your

Accessing webservice with credentials using vba

放肆的年华 提交于 2021-02-19 08:33:26
问题 I'm working on a longer script for Access and at one point it is necessary to check a webservice for the latest version of a file (the filename). This webservice is only accessible via a browser with an URL like https://webservice.example.com:1234/Server/test.jsp?parameter=value then it is necessary to authenticate with the standard browser username password pop up. Of course I could skip this pop up if I'd use something like https://user:password@webservice.example.com:1234/Server/test.jsp

ms access, need to get all rows with a distinct column

一曲冷凌霜 提交于 2021-02-19 08:13:05
问题 I have a table called "parts" which stores information on electrical connectors including contacts, backshells etc. all parts that are part of an assembly have a value in a column called "assemblyID". There is also a column called "partDefID", in this column connectors will have a value of 2, contacts will be 3. I need to get rows for all connectors that have a unique assemblyID. It's easy to get rows that represent connectors just by selecting rows with a partDefID of 2 but this will return

Access/SQL Server 2008 Join using Like not working

安稳与你 提交于 2021-02-19 08:04:56
问题 I apologize ahead of time because this question is in various forms many times on this site, but none of the solutions I have tried implementing seem to work properly, and I cannot find an answered question that gets me the right answer. I am working in access for a co-worker, though it will probably be in SQL in the future once he can get a server set up. I am trying to join two tables using Like, which is easy enough, except that it just is not working properly. First, an example from each

How to build an editable form with data equivalent to a join?

≯℡__Kan透↙ 提交于 2021-02-19 07:47:26
问题 I have a table Tbl as follows: +----+------+----------+ | ID | Item | ItemDate | +----+------+----------+ | 1 | xv | 7/23 | | 2 | drc | 3/15 | | 3 | fna | 3/15 | | 4 | fna | 1/19 | +----+------+----------+ A user has requested a form TblForm based on this table that includes a column maxDate that gives the most recent ItemDate for each Item . The form must allow the user to edit Tbl data, so I can't just build a form based on a join query, as Access doesn't allow you to edit the results of a

Calculate Percentages In Query - Access SQL

匆匆过客 提交于 2021-02-19 07:42:31
问题 I'm trying to quantify some things. Here's a sample (simplified of course): tblParent: { Number, Name } tblChild: { Number, Name, ParentNumber, Criterion } I'd like to count the total number of Children with the same ParentNumber (easy using a Group By and a Count(1) ), but the problem is comparing that number with the number of children with the same ParentNumber who have Criterion = "Something" . Here's what I have so far: SELECT "Criterion = 1" AS CritDesc, COUNT(1) AS Total, ParentNumber

Making a SOAP request from Access 2007

扶醉桌前 提交于 2021-02-19 04:44:26
问题 I am currently working on a system in Microsoft Access 2007, and I need to make a SOAP request to an outside webserver in order to retrieve some data. I'm new to both SOAP and Visual Basic, and I've been having trouble figuring out exactly what I need to do to make this SOAP request happen. From some Googling about, it seems that previous versions of Access may have needed Microsoft's SOAP Toolkit in order to make a SOAP request. So far as I can tell, however, the SOAP Toolkit was deprecated