ms-access

Access Not allowing INSERT or UPDATE of null values in SQL-Server column (Access Run-time Error 3162)

橙三吉。 提交于 2019-12-24 07:49:20
问题 Hello the wide world of stackoverflow, ISSUE: I am currently working on developing a sql-server database that uses access forms to get and insert data. Prior to yesterday everything was working fine. The issue now is that I am getting the following error when trying to run my insert query. Access Runtime Error '3162': You tried to assign the Null value to a variable that is not a Variant data type. ISSUE DETAILS: This seems to be a result of Access not letting me INSERT or UPDATE null values

MS Access - Date after fourth birthday

萝らか妹 提交于 2019-12-24 07:47:04
问题 Hopefully a relatively simple query. I'm using MS Access, I'm trying to work out from the date of birth, the 1st of September after their 4th birthday. So if my DOB was 02/07/2015, it would return 01/09/2019. If my DOB was 03/09/2015, it would return 01/09/2020. Any help would be much appreciated. Thanks 回答1: You could define a function such as: Function SchoolStart(dob As Date) As Date If DateSerial(Year(dob), 9, 1) < dob Then SchoolStart = DateSerial(Year(dob) + 5, 9, 1) Else SchoolStart =

How to append data from an Access table to a SQL server table via a pass-through query?

旧街凉风 提交于 2019-12-24 07:45:41
问题 It seems like it's only possible to use a pass-through query to retrieve data from your SQL Server tables and into MS Access. But how about the other way? From an Access table to a SQL server table. What are my options from within MS Access when I need high performance? (The normal approach of having an append query that appends to a linked table is simply too slow ) In an pass-through query I cannot reference MS Access tables or queries, and therefore my INSERT INTO statement cannot work. Is

ADOQuery1 parameter 'card' not found

試著忘記壹切 提交于 2019-12-24 07:36:37
问题 i've used the parameter method but now i have a problem. i want to insert all my data inside the table. i need to insert 2 table at once. so heres my full coding. need help. why it says like that? ADOQuery1.Close(); ADOQuery1.SQL.Clear; ADOQuery1.SQL.Add('INSERT INTO STUDENT (CARD_ID,NAMA,MATRIC_ID,SUBJEK,KURSUS,FAKULTI,Seksyen,TAHUN) VALUES '); ADOQuery1.SQL.Add('(card,nama,matric,subjek,kursus,fakulti,seksyen,tahun)'); ADOQuery1.SQL.Add('INSERT INTO subjek2 (CARD_ID, MATRIC_ID,NAMA,SUBJEK)

Access unable to complete “compact and repair” on one machine

流过昼夜 提交于 2019-12-24 07:36:00
问题 We've had MS Access running for years as a scheduled task reading files from a mainframe and printing out a bunch of reports. Of course, it grows with each invocation, so it is set to compact and repair on exit. Two weeks ago, something trashed Windows on that machine, and the people in charge of such things decided to put the newest "corporate standard image" on it. Now, on exit, the compact and repair successfuly creates the optimized db1.mdb (, db2.mdb, ... db99.mdb), but fails to

Dynamic Access Form

橙三吉。 提交于 2019-12-24 07:35:17
问题 I am creating a dynamic form in Access 2003. Each time the form is opened combo boxes are created based on table of "keywords." My code is having trouble deleting old boxes (or their labels, I'm not sure) and every opening after the first gets hung up on duplicate names (Run-time error '2450'). Secondly, junction table holding the "checked" keywords will fills up at a low finite amount. Thirdly, I can't figure out how to populate the combo boxes based on the junction table records. When the

Access Caching ODBC connection settings

心不动则不痛 提交于 2019-12-24 07:28:44
问题 My company uses SAI heavily and in order to create reports from this system we use ODBC to connect to the DB. Our setup at the moment is regional and thus we have separate environments for each region. When trying to access these environments using MS ACCESS I am finding that I cannot link to tables in different environments and retrieve accurate data. I can create the links to various environments using the specific DSN's. I then can access the data, however the first table that I open, no

MS Access perform POST webrequest

孤街醉人 提交于 2019-12-24 07:28:32
问题 In my MS Access application I need to send a batch of info to my webserver on a regular basis. I don't need anything fancy like SOAP, XML-RPC or anything, just a simple POST page request is sufficient. I've Googled a bit but have been unable to turn up anything really helpful. Does anyone know of a resource or have a code sample to perform this? 回答1: Here is one I used for HTTP GET requests where I wanted to retrieve a web page's HTML. You could substitute POST for the pMethod parameter and

ms-access: designing a report: printing text on specific x,y coordinates

不羁岁月 提交于 2019-12-24 07:20:55
问题 i need to design a report that will print text on specified x,y coordinates for example, i will input (50,50), (60,60), (70,70) and i will have my program print text at those specific coordinates on the report. in total there will be about 50 different coordinates. how do i achieve this? should i be using a label control or a textbox? should i be creating the controls dynamically or should i already have controls set at the specified regions? 回答1: Usually this is done when creating some type

Use system tray & icons in VBA (Access)

ぐ巨炮叔叔 提交于 2019-12-24 07:18:44
问题 I've found a few tutorials that explain how to use the windows API to get a custom icon in the system tray. These are all for Visual Basic, and they don't seem to be scaling to VBA well. I'm following this short tutorial: http://atchoo.org/vb/systray.php Basically, you have to set the hIcon value (a 'long' variable) but it does not work. I've tried to use the LoadPicture() function, which does not give me any errors, but also fails to add a new icon. I can't supply Me.Icon, nor can I set it