Search results

  1. H

    Check if string also appears in other table

    Hello, I've a short question: I want to write a query that inner joints two tables and updates a specific column based on a description that also appears in the other table. I'm working on the WHERE part of my query here. To show you what I mean: In table A column 1 should be updated with a...
  2. H

    Delete record where text field contains special character

    Hey community, I only have a short question: I've a table with several columns, one of them is a text field. Within them I have some records that looks like this and have a special character: "AX ELEVATE #O SUPERIOR" As you can see this record contains a special character -> # (hash or...
  3. H

    Update table with result from query

    Hello community, I'm dealing with a rather small problem at the moment. I want to update a column in my table with a value from a SELECT Count query. But Access tells me that the operation must use an updateable query. The thing is that I don't know how to do it :/. Just to give you an example...
  4. H

    Control sub table with button

    Hello community, I've a question: Is it possible to control an embedded table within a form by the use of a button? I created a form that looks like this: When the user enters a SAP number into the text field and clicks the go button some code behind it looks up the SAP number in a table and...
  5. H

    Set value based on result

    Hey community (and a happy new year to all of you), I need your help for a simple problem: I want to calculate the balance for each order number I have in my table. If the result is = 1 it should set the value = true in column "won" (it's a yes/no column). So I've coded something like this...
  6. H

    Update first record for a number

    Hello community, I have an issue with a recordset that I'm trying to solve but I somehow struggle with it. Couple of weeks ago the user arnelgp helped me out with a similar problem but I have troubles applying his method to my "new" situation. What I want to do is: I want to compare dates...
  7. H

    Update second record

    Hello, I want to update a table and created an update procedure to do that: If Not rstDaten.NoMatch Then DoEvents Do While (varOrderNumber = ![sapsys_SAPNr] And ![sapsys_KMATID] = varMatID) If ![sapsys_date] <>...
  8. H

    Adjust Calculating Quarter

    Hello community, I've a short question: I've some code with which I can calculate the quarter from a date: sapsys_quarter = "Q" & Format([sapsys_date],'q') The thing is that "our" first quarter starts on October 1st and not January 1st. So right now we're in quarter 1 and not quarter 4. How...
  9. H

    how to check if value already exists in the past

    Hello, I want to update a column by checking a condition if an order number already exists in the past. I coded some SQL but it doesn't work how I want :( UPDATE tblSAPSys AS a INNER JOIN tblDatenAusExcelNeu AS b ON a.sapsys_SAPNr = b.Verkaufsbeleg SET a.sapsys_date = b.Kalendertag WHERE...
  10. H

    Change data type to date

    Hello, I have an imported table from Excel with three columns I want to change the data type of. To do that I use the code CurrentDb.Execute "ALTER TABLE [tblOrders] ALTER COLUMN [MaterialID] DOUBLE" But now I want to change one column to date with this format: mm.yyyy and the other one...
  11. H

    Excel 2010 - Find last used cell in range

    Hello, I need a little help very quick, I couldn't solve this problem on my own: I want to find the last written cell in the range A2:C700 using VBA and store the line number in a variable. I already have something like this but it's only for one column and not a range: lastcell =...
  12. H

    Update table based on condition

    Hello community, I need your help very quick. Actually my problem is pretty easy but I've been trying to find a solution for hours now and can't solve it. That's way I need your help very quick. I want to update a table called tblFinalOrder, that looks like this: In particular, I want to...
  13. H

    Update table where column cell is empty

    Hello, I have a small problem: I have a table with over 20 columns. In every column there are some 1's, but the other cells or tuples are empty. In these empty cells I want to write a 0. So I need an UPDATE query. But what should I write for the WHERE condition? So he should check every cell...
  14. H

    Query for Fiscal Year and Month

    Hello, I want to build a query that calculates the fiscal year and the month from a date on-the-fly. I tried to do it in VBA, but it's more complicated than in query I guess. So this is my table: The date is on the left, in the middle I want to have calculated Jan 14 and on the right I want...
  15. H

    Copy value into another form

    Hello, I have a small problem that I can't solve and I'd ask you for your help. My problem is that I want to copy the value of a text-field of form frmSnippet into another text field of form frmChange. But this is not possible, Access tells me that it can't find the form frmChange. But it's...
  16. H

    Generate query dynamically

    Hello community, I have a problem I want to solve but I don't know how to properly do it. I already learned here that I can alter a SQL string by typing something into a text box and reading out the content (mySQL="....WHERE (" & strDetec & " is null..) But what I want to do now is: I have 6...
  17. H

    SQL query over mutiple tables

    Hello community, I have a problem / question regarding a SQL query and I hope you can help me. My initial situation: I have 3 tables that I INNER JOIN together with a number. The number is the same in each table. By doing this I get a big table with 11 columns. The tables I use look like this...
  18. H

    Run-time error 1004 while Export to Excel

    Hello, I'm using Access 2010 and I want to export a query to Excel by clicking a button. Every time I click on it Excel opens but doesn't open my worksheet, it's just gray like you just open the program without a table. After exiting it Access tells me I got a run time error 1004: the...
  19. H

    Copy values into following fields

    Hello, in order to get a better data base I want to fill some empty fields in my data record with values from another data record. In my table I have 5 columns, I created my table here very quickly because I'm not allowed to post pictures: ID | Sales Receipt | Description |...
  20. H

    Runtime Error 3061 in Acc2010

    Hello, I've a problem in Access. Every time I perform a SQL query to write the result of the query into a text-field I get a run time error 3061 : Too few parameters. Expected 1. This is my code: Private Sub Text0_AfterUpdate() Dim str As String, strSQL As String str =...
Top Bottom