Search results

  1. D

    Am I making it too complicated..?

    Loop a Select Case...
  2. D

    Capturing record navigation from listbox navigation buttons

    I want to use it as a way to display the data in the record. The user presses the down or up arrow on the control and the next record title is selected. Subsequently, all other data on the form is updated so that you are always looking at similar data. So I really do want just the next...
  3. D

    Capturing record navigation from listbox navigation buttons

    I have a listbox. I have the AfterUpdate property working fine. I can keydown the keyboard arrow key and my AfterUpdate sub runs. If I use the buttons on the listbox control to navigate the records the AfterUpdate does not trigger. I've scoured the web and found nothing. I need to capture...
  4. D

    Displaying specific fields of a data set based on combobox choice

    If that isn't working for you.... I forgot that Access is slightly different from Excel. I use Excel a lot more. You can do the same thing as I told you, but have it auto generate some of the code for you if you right click on the combo box in design mode, click properties, click the Event...
  5. D

    Passing RecordSet as a parameter

    The stuff you want is in bold... the rest is just from stuff i used to test it Function bQueryVerifyControlValue(strSQL As String, strFieldName As String, ctrl As Control) As Boolean Dim rst As New ADODB.Recordset On Error GoTo ERROR_EXIT bQueryVerifyControlValue = False...
  6. D

    Me.Controls.Add() method for UserForm in Access

    Thanks for the replies. Since posting this, I have decided to abandon it and keep the code in a .xla file. I'll try not to talk too much... What I was trying to do was use a UserForm, not a Form. UserForms are not often used in Access but it can be done. From what I gathered, though, runtime...
  7. D

    WHERE clause

    radek... did you see my post? If you can make it work in the SQL editor then you can make it work in VBA. Tell us that you made the query work in the editor and we can help you write a simple line of code that will replace the ',' with a '.' .
  8. D

    Me.Controls.Add() method for UserForm in Access

    This code works fine in Excel, but when I put it behind an Access DB it gives me a 'Run-time error '13': Type mismatch' error. Dim ctrl as control Dim ctrlName as string ctrlName = "whatever" Set ctrl = Me.Controls.Add("Forms.Label.1", ctrlName, True) I know it doesn't like the...
  9. D

    Displaying specific fields of a data set based on combobox choice

    If you are using VBA to update your form, your best bet would be to dynamically create the form. I haven't done something EXACTLY like this, but it's all basically the same idea. Use this... Sub ComboBoxNameHere_Change() dim db as database dim rst as recordset set db = currentdb...
  10. D

    Claiming that table does not exist

    I agree with JohnLee, make sure your query works as a standalone. Seems likely there is an error with the SQL in Query3.
  11. D

    WHERE clause

    lol. radek225 you should take a look at your table name/ field names and ask yourself if anyone who needs to work on the database in the future will be able to interpret the names you've used. I think that is the main problem. typical convention is something like... tbl_whatever aka...
  12. D

    Referencing VBA code book in Access

    I stand corrected: mda is the Access add on file extension. http://www.databasedev.co.uk/access-add-ins.html
  13. D

    Referencing VBA code book in Access

    I use Excel a lot, and in Excel I have created small code libraries that contain functions that I use over and over and over and over.... The one I am concerned with has functions that are responsible for executing commands within a seperate application. I have saved this as an xla file or an...
  14. D

    SQL SUMs promblems

    Plog, you may be correct in that assumption, however, there are extenuating circumstances which would ultimately make that a much for difficult process. Here are several that I can think of... 1. I am getting the values from linked databases, and they differentiate the data between 300 and...
  15. D

    SQL SUMs promblems

    Solution: SELECT TEMP_HOLD.CUSIP, (SELECT SUM(HOLDERS.ORIGINAL_FACE) FROM HOLDERS WHERE HOLDERS.CUSIP = TEMP_HOLD.CUSIP) AS [400 ORIGINAL FACE], (SELECT SUM([300_HOLDERS].ORIGINAL_FACE) FROM [300_HOLDERS] WHERE [300_HOLDERS].CUSIP = TEMP_HOLD.CUSIP) AS [300 ORIGINAL FACE] FROM TEMP_HOLD...
  16. D

    SQL SUMs promblems

    They are tables. They have the same column layout, only the values differ. I do have a small problem with the query but I am almost done with it. I will post up the code for your review. Problem: TYPICALLY 300 values will only show up if there are 400 values. However this is not always the...
  17. D

    SQL SUMs promblems

    Haha. I'm talking about the sub query. If I made a separate subquery everytime I would have a lot of queries and it would be difficult to keep them in order. That is why I am using my solution. I placed the subquery in the select statement and thus have all SQL in '1' query. Don't think I'm not...
  18. D

    SQL SUMs promblems

    Alright cool. I want it all in one query though cause I have around 20 queries already and if I didn't make them relatively complex I would probably have more like 50. At 20 it's confusing, at 50 it's a headache.
  19. D

    Employee Time in and Time out entry

    Why don't you just have the employee clock out on break and then clock back in after break? Then the break is the difference between the time out before break and the time in after break... Seems a lot simpler than figuring out time direction and if they don't take a break you can figure that...
  20. D

    SQL SUMs promblems

    In the original query or the one with the sub query? The full length one I posted up gets the correct results. I'm also not sure that I can use distinct like that. I think it has to come at the beginning of the select statement and then applies to all fields listed.
Top Bottom