Search results

  1. T

    Browsing to another form, and passing values

    I'm not certain quite how to express this, but let's take a stab. All forms and controls are unbound. (See below) I have a situation with two object classes (let's call them Studies and Surveys). Each class has an independent existence, but surveys 'belong' to a study. I need to be able to...
  2. T

    Problems using LIKE clause in SQL SELECT

    A quick update. While walking the dog I was thinking about the "invalid data" comment. Even though there is nothing in the combo-box definition to imply that it is a numeric field,. the first field of the SELECT statement references a numeric field. Seems as if MS is taking this to mean that...
  3. T

    Problems using LIKE clause in SQL SELECT

    Thanks, LPurvis, for a clear explanation of why the (wrong) cursor-type was contributing to my dilemma. I've replaced it with adOpenKeyset and, as you predicted, it now reports a valid record count. Myopia, too, contributed to missing the 'False' indications on the BOF/EOF tests. So a quick...
  4. T

    Smart Search/Dumb Programmer - Populating a combo box; Error 2118

    I'm learning by example (and by failure - who ever learned anything from success?) about an Access 2010 combobox. This is an unbound control on an unbound form. and I'm using it to display an increasingly refined set of entries from a table. Just like the thing that Google does when you're...
  5. T

    Problems using LIKE clause in SQL SELECT

    After due chastisement from Spikepl, I have replace the '+'concatenation operator by '&'. The code for the query is as follows (declarations, etc omitted): SQLCommand = "SELECT SampleData.ID, SampleData.LastName, SampleData.FirstName FROM SampleData WHERE LastName LIKE " SQLCommand = SQLCommand...
  6. T

    Problems using LIKE clause in SQL SELECT

    OK - we're one small step forward for ADODB syntax, and one giant leap backwards for results. Here is an example of a SELECT statement that does work: Dim rs As ADODB.Recordset Dim SQLCommand As String Set rs = New ADODB.Recordset Debug.Print "Match wildcard pattern" SQLCommand = "SELECT *...
  7. T

    Problems using LIKE clause in SQL SELECT

    Well, you've made it past the "So quick that I feel like a complete and utter fool" limit! Using a % rather than * certainly returned the right set of data in my test bed. Now onwards to using a 'real world' situation. Thanks, Bob Tony PS Where is this documented?
  8. T

    Problems using LIKE clause in SQL SELECT

    I hate it when there's a quick response ;) but in this case it doesns't help; Here's the more extensive code that I'm using: Dim rs As ADODB.Recordset Dim SQLCommand As String Debug.Print "Unfiltered SELECT!" SQLCommand = "SELECT * FROM SampleData;" Debug.Print SQLCommand Set rs = New...
  9. T

    Problems using LIKE clause in SQL SELECT

    Hi there I'm building a lab db to brush up my SQL. One of the exercises I'm setting myself is to create a SELECT clause that will find all the elements in a table that match a pattern. Here's the SQL command towards which I'm aiming: SELECT ID, LastName, FirstName FROM SampleData WHERE...
  10. T

    FileOpen and FileSaveAs dialogs not available in Access 2010?

    Ain't that the truth though! It's a real pity that the Office development environment is so susceptible to quick projects, and (generally) so robust. If only Open Office offered VBA! Tony
  11. T

    Format function causes compile error in Access 2010

    I wonder if the date-like flavor of your parameters had any effect. The message was "Array expected". OTOH, a year value is pretty scalar in nature, isn't it! Here's the code I was trying to use: ' SurveyIndex now points to the ROW of the entry for this survey ' Create/Update the data for...
  12. T

    FileOpen and FileSaveAs dialogs not available in Access 2010?

    (Hi Michael - did you get here from my rant on Format :rolleyes:?) I have a reference to Microsoft Office 14.0 Object Library, and, indeed, the IDE allows me to create the code. What it doesn't do is to mention that FileSaveAs and FileOpen are no longer available. All that is offered is a...
  13. T

    Format function causes compile error in Access 2010

    Thanks, again, Michael. The issue is not using the range, it is constructing the (address of the) range. So, I can reference a range as wrkSheet.Range("A1") with no trouble. I can even do it somewhat more elegantly by saying: const FirstSurveyThatIWantToExtract="G2"...
  14. T

    FileOpen and FileSaveAs dialogs not available in Access 2010?

    Say it isn't so! I'm trying to select an option for naming a file (Excel spreadsheet) that will contain data exported from my Access database. I'm using Microsoft Office 14.0 Object Library references, but when I try to create a FileDialog, it tells me that: (Actually this showed up when I...
  15. T

    Format function causes compile error in Access 2010

    Thanks for your response, Michael. Hmmm. I wasn't aware that VBA was application specific! Yes - I use format() much more in Excel, but I figured that VBA would still make the function available. It certainly does in the Immediate window, as I noted. All I'm trying to show is that this is the...
  16. T

    Format function causes compile error in Access 2010

    I have a database where I have a need to extract data into an Excel spreadsheet. I am building the spreadsheet but need to construct some range values, using a numeric variable. For example: const IndexCol="A" dim IndexRow as long dim RangeAddress as string for IndexRow =3 to 8...
  17. T

    Navigating within a navigation form

    I discovered the solution to this, so I'm posting it here in the hopes that others may find it useful. First, the general condition within which I am working is that all of the forms used as sub-forms within the Navigation Form are independent forms. In other words they all operate just fine...
  18. T

    Navigation Form - opening same form problem

    I had a similar problem. I believe that the appropriate DoCmd is BrowseTo, rather than OpenForm. This seems to work directly on the Navigation Form and its associated buttons. One caveat - if you are doing any manipulation of the controls on the target form before browsing to it, you will open...
  19. T

    Navigation form suddenlt stops working

    I have a most curious situation. My application is using a Navigation Form (Top buttons = Major Area, Left Hand buttons = minor area), and all of a sudden it has stopped working! All of the forms used as sub-forms in the Navigation Form are also 'available' as independent forms, and they are...
  20. T

    Programmatic creation of two-level navigation control

    I'm trying to create a navigation control on the fly. When a user logs in to my application they have the possibility of accessing several parts of the application at several levels. Specifically there are seven main areas each of which has up to 10 sub-areas. Depending on the capabilities of...
Back
Top Bottom