User Profile

Collapse

Profile Sidebar

Collapse
mforema
mforema
Last Activity: Aug 11 '08, 09:09 PM
Joined: May 30 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mforema
    replied to Runtime error 2001 - huge frustration
    Haha, I just figured it out, too. Widge removed the single quotation marks around the combobox reference. I guess single quotation marks aren't used with numbers.

    My code had something similar, where I reference a textbox that users type a number into. I removed the single quotation marks, and the code worked like a charm!

    Thanks again!...
    See more | Go to post

    Leave a comment:


  • mforema
    replied to Runtime error 2001 - huge frustration
    I have no idea what this means. I have a similar problem, and this doesn't help me. Can someone explain what this solution means?

    Thanks!
    ~mforema...
    See more | Go to post

    Leave a comment:


  • mforema
    replied to Searching Worksheets in Excel by Name
    It worked!
    Thanks Stewart!...
    See more | Go to post

    Leave a comment:


  • mforema
    replied to Searching Worksheets in Excel by Name
    I should also note that there will never be sheets that have the same name.

    Thanks!...
    See more | Go to post

    Leave a comment:


  • mforema
    started a topic Searching Worksheets in Excel by Name

    Searching Worksheets in Excel by Name

    Hello,
    I have a userform in Excel with a textbox and cmd button. I want to give the user the ability to search for a specific worksheet name within an Excel Workbook.

    My code for the cmd button is as follows:

    Code:
    Private Sub cmdSearchName_Click()
    Dim ChemName As String
        'assigns user's entry to the variable "ChemName"
        ChemName = txtName.Value
    
        If ChemName =
    ...
    See more | Go to post

  • LOL :) Sometimes I think better when I talk about problems with someone else; I guess it forces me to slow down and think through them more critically....
    See more | Go to post

    Leave a comment:


  • Yep, that was it. The problem was the current value in the ArticleID textbox wasn't updated, which means the new Article ID didn't even exist in tblLiteratureAr ticles. So, I inserted the following code into the AfterUpdate event in order to save the new record:

    Code:
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    Now, the code works perfectly!

    Thanks!
    ~mforema...
    See more | Go to post

    Leave a comment:


  • I have tried the SQL in a query. I keep getting the same error message that says it will not append the table due to a problem with the keys. I think I may be running into problems with the AfterUpdate event. I want the code to get the current value from two text boxes - 1. txtKeyword1 from frmKeywords and 2. ArticleID from [frmLiteratureAr ticles - edit]. If the Article ID does not exist in tblLiteratureAr ticles, where it's part of the primary...
    See more | Go to post

    Leave a comment:


  • I have three tables set up as follows:

    tblLiteratureAr ticles
    ArticleID (PK)
    Title
    Author
    etc...

    tblKeywords
    Keyword (PK)

    tblArticleKeywo rd (Join table with composite key)
    ArticleID (FK)
    Keyword (FK)

    The primary keys in tblLiteratureAr ticles and tblKeywords are populated via VBA code, which works fine. My problem occurs when I try to populate...
    See more | Go to post

    Leave a comment:


  • mforema
    started a topic Appending Records to Table with Composite Key

    Appending Records to Table with Composite Key

    Hi Everyone,

    I am trying to write some VBA code that will append records to a table, but this table has a composite key. My initial code looks like this:

    Code:
    Dim mySQL1 as String
    
    DoCmd.RunSQL "INSERT INTO tblKeywords (Keyword) Values ('" & txtKeyword1.Value & "')"
    
    mySQL1 = "INSERT INTO tblArticleKeyword (ArticleID, Keyword)"
    mySQL1 = mySQL + "
    ...
    See more | Go to post

  • mforema
    replied to Adding More Criteria to a Query
    I believe I figured it out. The final solution is below; I will continue testing tomorrow to make sure that it indeed works.

    Code:
    SELECT tblLiteratureArticles.Abbreviation, tblLiteratureArticles.ArticleID, tblLiteratureArticles.PrincipalAuthor, tblLiteratureArticles.TITLE, tblLiteratureArticles.Journal, tblLiteratureArticles.Volume, tblLiteratureArticles.Number, tblLiteratureArticles.PAGES, tblLiteratureArticles.DATE, tblLiteratureArticles.OtherAuthors,
    ...
    See more | Go to post

    Leave a comment:


  • mforema
    started a topic Adding More Criteria to a Query

    Adding More Criteria to a Query

    I have a query that uses a function to search for keywords separated by commas. The function works great! However, I need the query to also filter based on a yes/no field in a different table. My tables are set-up as follows:

    tblLiteratureAr ticles
    Abbreviation (FK)
    ArticleID (PK)
    Title
    Author
    etc...
    tblLitCategorie s
    Abbreviation (PK - one-to-many relationship with tblLiteratureAr ticles)
    MajorCategory
    Selected (Yes/No field)
    ...
    See more | Go to post

  • mforema
    replied to Problem with Function used in Query
    Thanks! The link was helpful!...
    See more | Go to post

    Leave a comment:


  • mforema
    replied to Problem with Function used in Query
    Thank you! It worked perfectly!...
    See more | Go to post

    Leave a comment:


  • mforema
    started a topic Problem with Function used in Query

    Problem with Function used in Query

    Hi Everybody,

    I have a function that worked perfectly when it was used in a query. I received help in creating this function from this discussion: Help with Query and Subform - post #18

    However, I had to change the Data Type of one of my fields ("ArticleID" ) from a number to text. Now, the query doesn't work, and I know it's because of the change that I made. The original code and sql are as follows:...
    See more | Go to post

  • mforema
    replied to Help with Query and Subform
    Awesome! It works great!
    Thanks again for your help!...
    See more | Go to post

    Leave a comment:


  • mforema
    replied to Help with Query and Subform
    I feel like such an idiot...Yes, the code and the SQL work fine. I didn't paste the SQL exactly. Also, I've been trying to test the code with "distillati on, column", when "column" is not even a keyword - "columns" with an 's' is a keyword. Some of my other search forms use a code that searches for partial matches - like "dist" will bring up "distillati on" and "distillate ." I'm used to...
    See more | Go to post

    Leave a comment:


  • mforema
    replied to Help with Query and Subform
    It's not working. It's running into the same problems as before. It only works with one keyword. When it does show results, it shows multiple results, because tblArticleKeywo rd consists of the composite key where each ArticleID is joined with multiple keywords, like
    ArticleID Keyword
    Article 4 - distillation
    Article 4 - column
    Article 5 - reflux
    Article 5 - distillation

    Thanks for your help, ...
    See more | Go to post

    Leave a comment:


  • mforema
    replied to Help with Query and Subform
    Thanks! It works fine when searching for just one keyword, but nothing appears when searching for more than one. When I view the query in datasheet view, nothing appears at all, not even an empty row. However, I do feel like I'm much closer to solving this problem. I will keep working on it!

    Thanks again for your help!...
    See more | Go to post

    Leave a comment:


  • mforema
    replied to Help with Query and Subform
    http://www.thescripts.com/forum/thre...arch+form.html - post #7...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...