Search results

  1. S

    Reading a listbox

    This should do what you want me.txtName = lsQuestions.column(2) me.txtAddress = lsQuestions.column(3) Just remember the columns start at 0 I hope this has helped Satal :)
  2. S

    How do I update a list (whose source is another table) on a form

    I think this is what you're looking for me.cboName.requeryI would put that in the Form_Activate sub. I hope that this helps Satal :D
  3. S

    Concatenate returned query records into single field

    Yeah that would be the same row, sorry. Umm... I can't think of anyway of doing that through SQL so I guess you would have to use VBA (unless someone else knows a way which I don't)
  4. S

    Concatenate returned query records into single field

    I have given a small example below which uses two fields in a table called 'Table1' and concatenates them. Hopefully this will point you in the right direction :) SELECT Table1.Forename, Table1.Surname, [Table1].[Forename] & " " & [Table1].[Surname] AS Fullname FROM Table1;
  5. S

    multiple values from a temp table

    I have to admit I am not 100% certain why this code is used, its just how I was taught to do it, I will ask my boss next time I see him (which I have to admit isn't for a week and a half as Im on holiday :D), although I get the feeling I might get the same answer as I just gave :P I would...
  6. S

    multiple values from a temp table

    I have to admit I am not familiar with ADO, I only use DAO.
  7. S

    multiple values from a temp table

    Then you just change the SQL to search by TS_Date Unless I am miss understanding Gemma's suggestion it is the same as mine. I would personally suggest trying to learn how to use recordsets as they are very useful :) They may not be the only solution for this but they're the best solution I can...
  8. S

    multiple values from a temp table

    Hello again :P My suggestion is to use DAO for example Dim db As DAO.Database Dim rs As DAO.Recordset dim ProjectDate As Date dim ProjectName As String dim ProjectHours As Integer Set db = CurrentDb Set rs = db.OpenRecordset("SELECT * FROM tblProjects WHERE...
  9. S

    Easiest question on this forum...

    How do you mean "declare a specific table field"? Do you mean that you want to be able to get information from a specific field in a table? If so then you could do something like this... Dim db As DAO.Database Dim rs As DAO.Recordset Set db = CurrentDb Set rs = db.OpenRecordset("SELECT * FROM...
  10. S

    Error 2001

    I quickly tested it and at least on my system if it was a delete query it didn't show you the rows if you ran it how I showed
  11. S

    Error 2001

    Error 2001 is an error message you recieve when "You canceled the previous operation" My personal suggestion would be to instead of having the prompt coming up asking the user to confirm that they want to delete the records, in the VBA have the following code DoCmd.SetWarnings False...
  12. S

    Error Traping with VBA

    I didn't download the attachment either :P I was actually thinking of having it when the user goes to click on "Save" or something like that. Yes you could check that it was appropriate BeforeUpdate but well as you said then you've got to have validation code on every control, whereas if you...
  13. S

    Error Traping with VBA

    While doing error handling is important it should only be used for dealing with things that you haven't been able to deal with appropriately through the code. Something as simple as this should be handled through a simple if statement if not isnumeric(me.text1) then msgbox "You must enter...
  14. S

    Error Traping with VBA

    Personally I would choose prevention over cure. If you use a function like IsNumeric() to check that the input the user has entered into a text box is in fact a number rather than a string of letters then you can stop the error occuring rather than trying to deal with it after its happened...
  15. S

    Add All into a combo Box

    I was assuming that you had both a Unique Field and a value in your combo box. So what you need is SELECT DISTINCT ([table1].[field8]) AS Expr1 FROM table1 UNION SELECT "<All>" FROM table1 ORDER BY [table1].[field8]; That should work :D
  16. S

    Add All into a combo Box

    Do you literally mean select all of the items in a combo box or do you want a row in the combobox saying 'All'? If you want to actually select all of the items in a combobox then you can't do that and would need to use a multiselect listbox like Chergh has said above. If you just want to add a...
  17. S

    VBA IDE View Function Comments

    This is a little bit of a weird question but I spend alot of time working with Java and one of the things that I like about Java (well technically IDE's for Java) is that when you type in a function name that you get to see information that the coder added about that function (comments, return...
  18. S

    Create Addin that carries on working when currentdb is made into mde

    Hello, I am trying to make an Add in for MS Access, which deals with making a database system ready to be sent to a customer (which involves making the database into a mde and creating the installation files). I have got all the major parts of the add in created but the only problem I have is...
  19. S

    Programmatically Creating mde

    I work for a company which builds Database Systems using MS Access, and I have been tasked with making a add-in for MS Access which automates the process of making the Systems ready to be sent to the customers. I have everything figured out apart from how I can automate the process of making the...
  20. S

    Changing the default sub template

    What I am trying to find out is whether it is possible to change the default template for sub's. What I mean by this is that in every function I create I put in some standard error handling code and I was wondering whether it is possible to change the templates for subs to automatically put that...
Back
Top Bottom