Search results

  1. I

    VBA for inserting topvalues in table

    Hi, Can you provide a bigger sample of data and the outcome you expect from it please? Cheers,
  2. I

    Days=NextDate-CurrentDate but How in Access Query?

    If I have this correct, you don't need the Accounts Table in your query. You can use: SELECT AccountNumber, TransactionDate, (SELECT TOP 1 TransactionDate FROM Transactions WHERE TransactionDate > Transactions1.TransactionDate And AccountNumber = Transactions1.AccountNumber ORDER BY...
  3. I

    Flexible recordsetclone?

    Helmpost, Mark isn't assuming you want to work with one record. You can use an event to make a Recordset on the fly, give your criteria and order preference. Once you have done this attach it to your Form. Set Me.Recordet = rsMyRecordset Where rsMyRecordset is the recordset object you have...
  4. I

    Auto numbering.....again

    It is but I wouldn't recommend it The main reason people want to do it is for some kind of invoice or sequential number, the only problem is, as you play with the database and delete test records, your numbers will jump up in stages. It will be forever a headache. Please consider looking at...
  5. I

    VBA Editor-Mouse scroll

    I've been using and advocating Freewheel for at least 7 years now, can't say I've ever had any problems with it.
  6. I

    Exporting to CSV

    Why don't you run export it from a query instead, you can use Format(YourDateField,"dd/mm/yyyy") As D Or you can swap the Day and Month around if you really insist ;-)
  7. I

    Help with Query and dates

    Sorry, I think you miss-read me. Dates are good, but use the word Date as a field name is not a good idea as Date is a reserved word in Access. Re-name the fields to something like AssessmentDate. Hope that clearer,
  8. I

    Windowless Forms

    In Access, no, sorry. Access is just an application itself, you need build your apps in VB, C#, C++ etc as mentioned above. Another thing, is the latest MSN messenger with its hide-away outer edge actually cool, or is it (as I find) really annoying to see that ghost window as you move it...
  9. I

    Help with Query and dates

    I'm little reluctant to offer a solution to this, I think you may need to re-design you tables a bit before you run into big problems later. You have a HUGE amount of fields in the Personnel (53!!!) table, I don't know what all the fields mean but I suspect things Like Rank will change and...
  10. I

    showing 0 if no results

    Julie, What Wayne is politely saying is, we need to see the queries your are talking about. Please can you provide examples. If you are not sure how to do this... In the design view select 'SQL' from the left most menu button in the toolbar, copy and paste the the text, with an explanation of...
  11. I

    Yes/no field transformed to 0/-1

    Did you notice there are 2 I's in IIF? It's an immediate if (IIF) not just IF.
  12. I

    Yes/no field transformed to 0/-1

    FIrstly Accesses Yes/No or True/False etc is of the Type 0/-1 and has a field size of 1, see Data Type from the help menu. You can change the values in the query, where you might have SELECT ThatField FROM.... You can change it to SELECT IIF(ThatField,"Yes","No") As YesNo FROM.... That...
  13. I

    using arrays in access

    You need to put the Arr(0) outside of the quotes: "INSERT INTO " & Arr(0) & "SELECT * FROM [Text;FMT=Fixedlength;HDR=Yes;DATABASE=C:\database\ ;].[PS0006#txt];", Hope that helps,
  14. I

    Updating a query

    You would use code. On the 'Employee Details' form add a button or use the Update button if you have one. Add the line Forms![YourFormNameHere].Requery That should refresh the data in the other form. Also, please delete your duplicate post and continue with this one, thanks.
  15. I

    Help with Update query

    I think your example is a little mis-leading as you are using the same numbers for T1_ID and T2_ID. If I have read this correctly this is not the case. Try: UPDATE Table1 INNER JOIN Table2 ON Table1.Invoice_No = Table2.Invoice SET Table2.Invoice = [Table1]![T1_ID];
  16. I

    Time() Help

    I would go with what Banana has put. Use: Dim TimeIn As Date If Time() < "18:30" Then TimeIn = "18:30" Else TimeIn = Time() End If You can get away with the Text part as Access will evaluate it as a Time. Cheers,
  17. I

    Append Query Field Name Problem

    Wrong Forum, You need to post this in the Query Forum. However I would consider looking at the structure of your database before you run into more problems in the future. A table shouldn't really have a field named 2007/08 It would be best to have something like Year (or...
  18. I

    Change Subforms Recordset - Runtime

    Thanks Bob for taking the time to provide an extensive reply. However the sytax you have provided doesn't appear to be working. I am actually trying to Set the Recordset of the subform not the RecordSource. On the form's load event I'm using Set Me.Recordset = rsMenu Which there is no...
  19. I

    'Invalid argument' error when sql run in Access VB.

    Hi, Can you provide the straight query which works please. Also, I wouldn't use all the str1, str2 etc. Just put them into the strSQL directly. There is also an awful lot of parenthesis in your SQL (I'm fairly certain Access put them in for you but Access is terrible at doing that.) You can...
  20. I

    Change Subforms Recordset - Runtime

    All, I'm having great difficulty working out the syntax to change the Recordset on a Subform. I'll try my best to explain. I have a 'Menu' subform which gets it's recordset from an ADO recordset, it's a continuous form using a Textbox for he list of options. The problem I'm having is, I'm...
Back
Top Bottom