Search results

  1. Summerwind

    Selecting Records from a List Box

    I do this quite often but don't use a recordset (As such) as the source of the list box. I use a SQL statement with the first column, which is the key to the record, hidden. The user clicks on the record in the list and the OnClick event runs code to create a recordset based on only that one...
  2. Summerwind

    Popup mode and toolbars

    I have spent many hours experitmenting and searching without result so maybe someone here can help me. I like to have my reports appear to users before they print them. I hide the main form of the app and have the report appear on the screen maximised. I also have a customised toolbar to enable...
  3. Summerwind

    Appending Queries

    You might like to have a look at using an ADODB command with an INSERT INTO command text. As you are needing to change data you could then use a further command with an UPDATE clause to make your changes. There is a lot of help available for these two SQL commands but if you need some more...
  4. Summerwind

    FindLast method

    I write using ADO rather than DAO so I'm not going to write the code for you but this is what you need to do: Firstly, you need to know the patient's ID which I can't see in your code. Now you need a SELECT statement to filter out your patient from the table. This might be something like...
  5. Summerwind

    SQL Server Money Data Type

    Hi All. I have searched forum without success so hope someone can help. I am using SQL server as back end with an mdb as front. I have several pass-through queries which use views as the data source for list boxes. Everything works fine except that money type fields do not appear in the Access...
  6. Summerwind

    Sub calling Sub

    You are not giving us a lot to work with here. However, if the called sub is providing the data to be worked with, shouldn't it be called before you set up the recordset? If that is the case, why not just base the form on the query and not bother with the called sub at all? Oh BTW, you don't...
  7. Summerwind

    Date Problem

    Not sure why you are getting 2003 dates, but strange things can happen with dates - both software and girlie types! Whenever I have problems with dates I find that converting them to DateSerial format usually solves the problem. I think this is due to the way the lower level software...
  8. Summerwind

    ListBox selection

    Use a Combobox instead of your text box and button. Base the rowsource of the combo on the query you are basing your list on. This has the advantage of not needing an extra form and makes your app much slicker. It would be slicker still if you based the combo rowsource on a SQL string and only...
  9. Summerwind

    Expires after certain date

    Hi All A useful thread this. I have been kicking around various methods based on suggestions in the thread and have come up with a solution that I'm happy with. My only problem now is: What is to stop the user simply re-installing the demo? I'm fairly sure there is an answer to this using the...
  10. Summerwind

    Expires after certain date

    Thanks for posting the code. I have been looking for something similar for I while. As I haven't had time to study the code yet, I don't have an answer for you and there is no guarantee that I ever will, but I will definitely try.
  11. Summerwind

    Using a listbox to filter a form

    Or you could do it the easy way: strSource = "SELECT CustomerNo,LName FROM tblCustomers" List0.Rowsource = strSource You probably dont need the user to see the key field, don't wnat to confuse the poor sod, so set width of the first column of the list to zero. Also make sure that the first...
  12. Summerwind

    String Cuts Short

    You could certainly make your strSQL string much shorter in a couple of ways: Firstly, instead of using "strSQL = strSql &" , use the continuation code. ie. strSQL = "SELECT fldOne,fldTwo, fldThree FROM " & _ "tblFields etc " Secondly, name the table that the selected fields are coming...
  13. Summerwind

    Link hundreds of tables by ODBC using code

    Hi IMHO a different approach may be needed. Linking to all of those tables is going to take massive network resources as well as make the whole operation quite slow, even if the system is blitzed with hardware capabilities. It may not be possible, but it may be necessary to only pull and push...
  14. Summerwind

    Replacing Normal Queries With VBA Code & SQL

    So tell me then Pat, what is the difference between writing the SQL string in the row source of the combo and writing it in code? I'll tell you - When its written in code, its easier to see for debugging purposes and easier to apply parameters. RE your PS (Hey, Hey - I'm talking in code), I've...
  15. Summerwind

    Replacing Normal Queries With VBA Code & SQL

    Let me ask you a question - How many comboboxes would you expect in a medium sized, user-friendly application? If they all have a separate query to feed them, that equates to quite a lot (In my case), if not sheds full. Writing a couple of lines of SQL code makes the App a lot smaller and...
  16. Summerwind

    Problems with VBA code on different computers

    I had a very similar problem once. The problem was that the server was mapped to different drives on the front end machines. That was when I learnt to use a global string as a connection string to the server! After re-writing code throughout app, changing the connection string for each front...
  17. Summerwind

    Replacing Normal Queries With VBA Code & SQL

    Might be some code missing here. Try: strSource = "Select EmployeeID, EmployeeLastName & ", " & EmployeeFirstName AS EmployeeName FROM EmployeeTBL ORDER BY EmployeeName" MyCombo.RowSource = strSource You can usually set the column details at design time. I very rarely, if ever, use queries...
  18. Summerwind

    User Rank

    Use a global variable eg, pubRank and set this value at time user logs in. Now use the value in this variable whenever you need to know his rank.
  19. Summerwind

    Converting old Data to a new Version of my DB

    Might help a bit if you give us the structure of your new tables ie. How do you now record for flowers, stone etc? A couple of queries is the way to go but need to know the table structure.
  20. Summerwind

    I thought I was geting the hang of this SQL stuff

    I got extremely p'd off with dates and their formatting a long time ago. I now use the DateSerial function when coding for dates. Its a couple of extra lines but I don't get all of the hassle with them any more. Now I can concentrate on all of the other rubbish that I write that stops my code...
Back
Top Bottom