Search results

  1. AlexN

    New Data in Not in List Event

    Hi everyone, I’m designing a music collection database, where I input all my music by Artist, Recording (album etc.), Media (CD, LP, mp3 etc.). There are two significant tables in this database, tblArtists and tblRecordings. There is also a data entry form frmRecordings based on...
  2. AlexN

    OnDirty or After Update?

    Thank you all for your answers. I finally adapted moke's and sneuberg's suggestions putting both parts of the code in the After Update event of the control, checking if there's is a new record. Thanks again, you've all been kind and helpful.
  3. AlexN

    OnDirty or After Update?

    Thank you for your answer. It's obvious then that I can't use the On Dirty event of the control to run the code appending the record to table B. Keeping in mind that existing records in table A are subject to change, thus affecting relevant records in table B, what would be the proper event to...
  4. AlexN

    OnDirty or After Update?

    Hi there, Every time a new record of a bound form is saved, a small piece of code in the AfterUpdate event of the last control of the record, adds a new record to another table (that means apart from the new record on the table the form is bound). Where (in which event) do I put the code to...
  5. AlexN

    Number of query values and destination fields are not the same

    Well CJs suggestion (using Amount as a text value in sql) worked perfectly alright. I only had to use ' ' for the Amount field also. Thanks CJ_London, Thank you all.
  6. AlexN

    Number of query values and destination fields are not the same

    Grumm suggested this : "You can just format the decimal field. Format(Me.[Amount],"Standard") But if the amount is not a decimal then you still get errors. " As I said I tried it with the same results. In fact I tried every possible format. Haven't tried the text format you're suggesting...
  7. AlexN

    Number of query values and destination fields are not the same

    Yes but, I don't want 2.4 in the table field, I want 2,4 (in fact 2,40). The way the field is formatted it'll accept 2.4 as 24 (in fact 24,00 e). Haven't tried it yet though. Forgot to mention that system (and access) use the Greek regional settings (thousands are separated with points(.) and...
  8. AlexN

    Number of query values and destination fields are not the same

    I'll try this too, but I'm curious on how the amount value will be appended in the table field which accepts currency numbers. For the time being I restricted inputs to integers only (rounding numbers). :)
  9. AlexN

    Number of query values and destination fields are not the same

    Tried all possible formats for the Amount value, all failed. Same old error message, still nothing appending. As for your suggestion for the account balance, helpful enough but I'm more comfortable with mine, and the whole database is built on this idea. However I'll give it a try, thanks
  10. AlexN

    Number of query values and destination fields are not the same

    It should be obvious from the code line : For every transfer transaction from one account to another, there's a subtraction from Account1 and an addition to Account2. First part happens automaticallly second doesn't. That why the append...
  11. AlexN

    Number of query values and destination fields are not the same

    My form is bound to tblTransactions mentioned in the code, the form's Amount control property is currency, and I don't know how to convert currency to US style like I did with dates :).
  12. AlexN

    Number of query values and destination fields are not the same

    It is currency (two decimal digits), and my input will always be with two decimal digits (except integers).
  13. AlexN

    Number of query values and destination fields are not the same

    Trying to insert an amount of 2,4 Euros the sql was : INSERT INTO tblTransactions ([Account1ID], [Account2ID], [TransactionDate], [TransactionType], [TransactionCategory], [Amount]) VALUES ( 6 , 1 , #02/02/2015# , 'Transfer', 'Transfer From' , 2,4) ;
  14. AlexN

    Number of query values and destination fields are not the same

    Well it obviously has something to do with the commas. Decimal numbers have comma and code sees the integer part as a value for a field, and the decimal part as another value for some (non existing) field. Any ideas?
  15. AlexN

    Number of query values and destination fields are not the same

    Thank you for your answer but I'm afraid I don't know how to do that. I mean I wrote the line you suggested, before the "CurrentDb.Execute line, and as far as I know that should bring a result in the Immediate Window. But every time I try to pass a new record it brings up the previously...
  16. AlexN

    Number of query values and destination fields are not the same

    Hi everybody, I use this line of code to insert records in a table CurrentDb.Execute "INSERT INTO tblTransactions ([Account1ID], [Account2ID], [TransactionDate], [TransactionType], [TransactionCategory], [Amount])" & _ " VALUES ( " & Me.[Account2ID] & " , " & Me.[Account1ID] & " , #" &...
  17. AlexN

    Data Input Form

    It's all a matter of terms, and about how I want to get results later on. We Greeks, don't use the term account for groceries for instance, groceries are an expenses category for us. Yes , TransactionCategory stands for Transaction Purpose , and, AccountCategory defines the kind of the account...
  18. AlexN

    Data Input Form

    You’re absolutely right about circular relationships, I moved them away. However, I won’t remove TransactionCategory field form tbltransactions because there is no other field uniquely determining the Transaction category in this table, directly or indirectly. Having solved the issue...
  19. AlexN

    Data Input Form

    It really goes this way:One type has many categories. Types are :Withdrawal, Deposit, Transfer Categories are like : Groceries, Insurance, Car Expenses, Salary, Bonuses etc.
  20. AlexN

    Data Input Form

    Well that's the table structure more or less : And that's the form I created : I first created a form bound to tblTransactions using only the AccountID, TransactionType and TransactionDate fields, and then I created a subform bound to the same table, using all fields. Main form and subform...
Back
Top Bottom