Search results

  1. F

    Syntax for Pressing Enter

    I use Outlook as my e-mail client. I prefer to use HTML format, althought the old school folks might prefer ASCII text messages. Dim ouApp As New Outlook.Application Dim MyMessage As Outlook.MailItem Dim sToAddress As String, sSubjectLine As String, sBodyText As String 'Bunch of code here...
  2. F

    Counting Random generated numbers

    Sounds like you need an array of a User Defined Data Type. This array consists of integers (generated by your RANDBETWEEN) and presumably a long integer (TALLY) that stores how frequently the integer has been chosen. Public Type TallyCount iMember as Integer lTally as Long End Type...
  3. F

    Returning Null or all records in query

    Have you tried testing the expression Nz([Question J/N],"Null")? I'd run the query (without a WHERE clause) using this item and check the unique values associated with it.
  4. F

    Passing an array of any data type as an argument to a procedure

    You could try a class module. The array would have class scope, as opposed to the life of the original routine. It worked in my test. -Mike
  5. F

    IIF name table

    SELECT [asset class] , iif(ct2.[asset class]='3050', 'yes', 'Nope!') as IIF_Example FROM CONVERSION_TABLE_2; I think the As was misplaced...
  6. F

    Code won't work

    Have you tried the selection in multiple steps (as opposed to a single, concise line of code)? Dim sRange as String .... sRange = "(A2:" .Application.Selection.End(xlDown).Select sRange = sRange & .Application.ActiveCell.Address & ")" .Application.Range(sRange).Select
  7. F

    Code won't work

    Have you tried dots (.) before the two instances of Selection? Or perhaps change Selection to .Application.Selection?
  8. F

    IIf syntax

    Since you are intending to link to another table with leading zeros, you may want to try a series of update queries. First look for those records where the length of SAP CO is 1. The Update value for this field is '000' & [SAP CO]. Repeat where length of field is 2, update with '00' Repeat...
  9. F

    IIf syntax

    The length (Len()) of a field will be numeric. Try the following: SELECT a.[FA Ctr], a.[SAP Co], a.[SAP Ctr], a.[GL Co], IIf([Len([SAP CO])] =3,'0' & [a].[SAP CO], IIf([Len([SAP CO])]=2,'00' & [a].[SAP CO]), IIf([Len([SAP CO])]=1,'000' & [a].[SAP CO]", "[A].[SAP CO]"))) AS Expr3 INTO...
  10. F

    Access Development Extensions

    I'm not familiar with the package wizard. When I distribute an application, the app checks for a list of linked tables. If a table is not linked, the app is directed to a server location and given the table name and password to link to the table. The details of the link changes for an SQL...
  11. F

    Access Development Extensions

    How are you linking to the SQL Server tables? Do you authenticate the user and then link to the tables? Is it possible that the test users don't have proper privileges to the SQL server?
  12. F

    Using a Macro to skip lines

    Are you really doing this through a macro, or are you using VBA code? In VBA code, I use either: VBA.vbNewLine, or VBA.Chr(13) & VBA.Chr(10) (Carriage Return and Line Feed) ...in order to add blank lines to a log file or Message Box.
  13. F

    Multiple ID's

    Dan: See the attached example.
  14. F

    Multiple ID's

    I'd add another Table: Table: Kits Kit ID: Long (lookup from Kitchen Sink where type = "kit") Part ID: Long (lookup from Kitch Sink where type = "part") I'd use this table to declare the parts that comprise a kit. I'd populate it with a continous subform linked to the record from Kitchen...
  15. F

    Data Base Entries are too slow

    Another approach is that the master summary sheet would call the 18 subordinate sheets for updates. The only burden (as far as read-write conflicts) is with the summary file. I would open the subordinate files as read-only, grab their data, and move on to the next file.
  16. F

    Multiple ID's

    Dan: I would not put the parts, kits and products in separate tables. Without knowing more about your business rules, I'd put them all in one table. Table: Kitchen Sink ItemID (Autonumber) ItemDescription (Text) Price (Currency) ItemCategory (Number or Text: Part, Kit, or Product) ... I'd...
  17. F

    Categories

    In your Subcategory, add a field for CategoryID. Each category may have multiple subcats, correct? You have a one-to-many relationship between those two tables. May a contact belong to more than one subcategory? If yes...you need another table that would link the ContactID and SubCatID. If...
  18. F

    UNION query MS Jet database engine cannot find the input table or query.

    Can you describe the code in a little more detail? Sub1 connects to the table, does something with 20,000 records.... Sub2 tries to do a UNION query involving the same table, with a new recordset and new connection. Perhaps Sub1 is conflicting with Sub2? After Sub1 is finished, it disconnects...
  19. F

    Getting total count

    Sorry, I'll retract the dungeon remark... ;) I can't get to Station2 unless I pass Station1, correct? How did the entry on 22-Oct-2005 happen? I failed Station1, but passed Station2? I'd lean toward the table design where you have only one test result per record. I'm probably not...
  20. F

    UNION query MS Jet database engine cannot find the input table or query.

    Let's examine this for a second..... Given your existing code for connecting to the table, you can create a recordset. No error is thrown. Can you open the recordset of the single connected table, traverse a record or two, do a debug.print of a few fields? No errors?
Top Bottom