Recent content by DonkeyKong

  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...
Top Bottom