User Profile

Collapse

Profile Sidebar

Collapse
thelonelyghost
thelonelyghost
Last Activity: Aug 12 '10, 04:56 PM
Joined: Jun 23 '10
Location: Elkhart, IN, USA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • thelonelyghost
    replied to Invisible Controls in Form
    The waffling is no problem at all. Actually I did gut the form (like you were suggesting) in the version I originally gave you. The process of starting and stopping work on it probably contributed to the lack of elegance in the code.

    I have since implemented Option Explicit--which I thought, given the initial word, was optional. I also got to like the compiler you were explaining to me how to use.



    If...
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    replied to Invisible Controls in Form
    Thanks, that really helps out a lot! I did know Data Entry was on but I wasn't positive as to what that meant. I originally thought Data Entry = Yes was equivalent to Additions = Yes, Deletions = Yes, and Edits = Yes. I understand is that it actually equals Additions = Yes, Deletions = No, and Edits = No.

    If Allow Additions = No and Data Entry = Yes, I would think Access would throw an error in the body of the one bound control (CTSLogNumber)....
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    replied to Invisible Controls in Form
    To be more accurate, I'm only asking for help to find the area of code that's causing the errors. I'll do my best to figure out how to fix it. Really any help would be appreciated.

    EDIT: I should also mention that I've looked into the .Visible property of controls and everything already has the .Visible property set to true, yet the problem persists.
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    started a topic Invisible Controls in Form

    Invisible Controls in Form

    Hey, it's me... again... but this time I have an issue I don't even know where to start on.

    Software: Access 2000
    OS: Windows XP Professional SP3
    Problem: When form loads, controls are invisible.

    I have two major forms in my database. one of them I've designed and sufficiently debugged whereas the other I've tried to upgrade and now the latter form doesn't function. In short, the upgrade is supposed to...
    See more | Go to post

  • thelonelyghost
    replied to Create new record in VBA
    Ah I see now! Maybe I was just confused before as to what the code accomplished, but the most recent explanation dispelled any of that. Thanks a lot, Steven Kogan! I'll choose yours as the best answer as soon as I test it.
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    replied to Create new record in VBA
    (1)Thank you very much for your response, Steven Kogan. I had forgotten DAO has the function to create a new record.

    (2)My apologies, I guess I was being unclear. I want to import Table A's autokey into the CTSLogNumber field of Table B. What is shown above is Table B. Changing around what table generates the key is not an option, either.

    Another thing I realize upon rereading my OP is that this is a multi-user interface...
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    started a topic Create new record in VBA

    Create new record in VBA

    First off, I already know of one answer to my question, but it's horribly... clunky, to put it lightly. What I'm looking for is a better way to go about this. Now my obligatory header

    Software: Access 2000
    OS: Windows XP Professional SP3
    Problem: Copying over the primary key (Autonumber) from Table A to Table B when creating a new record in Table A.

    Sorry if the synopsis is confusing, allow me to explain....
    See more | Go to post

  • Also, I figured I should clarify what "(" & Me.ControlName. Value & ", " is supposed to mean. As you know, you can define a string like so: strString1 = "Hello World!". To make the value dynamic, you can create a form that has you input a value in the string, i.e. strString2 = "Hello " & Me.txtName.Valu e & "!". The title of the form's input (control) in this case is "txtName"....
    See more | Go to post

    Leave a comment:


  • Three things:
    1. Check the datatype of ClassGroupID
    2. What are the fields, tables, and datatypes?
    3. Syntax issues

    (1)
    To start, I apologize because I misunderstood the situation with your tables. I thought ClassID, GroupID, and ClassGroupID were all different tables. Since you said that ClassGroupID is the primary key, are you positive it's an autonumber datatype? If not, that may be your issue. If it is, @Steven Kogan is right: you...
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    replied to Data Type Mismatch - CVDate
    Summary

    Since only AFTER sorting through all of the code I found out I didn't have enough knowledge on the subject, I thought I would make it easier for people to read what's going on by summarizing the code in each of the above posts, thanks to the magic of variables. If there's any question as to the logistics of any part, refer to the variable section. Otherwise you should be able to get the gist of it from the equation section....
    See more | Go to post

    Leave a comment:


  • How are you matching things? What's the setup?

    I've designed my own search-form where it creates a string of SQL and sets it as a Record Source. It also applies to Row Source, etc. that can use a SQL SELECT statement.

    Look at the source code HERE for one method of doing so.
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    replied to Logging Changes to Table
    @ADezii: Ah, then if the array varControls starts at index 0, all of the even indexes (and zero) will be the values and the odd indexes will be the names?

    I see that I forgot to state the overall purpose of this array. It is used to compare each value of each control to a previously collected set (to test each field if it's 'Dirty'), then add the field name to a string written to one delimited field in a table. Let me give an example...
    See more | Go to post

    Leave a comment:


  • Like what @beacon was saying, you could run an INSERT INTO statement to create a new record. I'm not exactly sure how your tables are formed, but one use of this code is made safer by making a submit button, then coding it like so:
    Code:
    Private Sub Submit_Click()
    Dim strSQL As String
    
    If Me.chkMFGAssoc = -1 Then
      strSQL = "INSERT INTO [I][tblMFGAssocClass][/I] ([GroupID], [[I]FieldName2[/I]], [[I]FieldName3[/I]]) VALUES (" &
    ...
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    replied to Excuse my ignorance: DAO / ADO
    Not that I'm trying to hijack the thread but can anyone suggest a good source to learn about DAO versus ADO besides the MS site? For some reason I can't follow how they're trying to explain stuff on there plus, if it's like any other part of Access, there's bound to be a guide out there explaining it in a way I can understand.

    @munkee: You have no idea how good you've got it compared to me. I'm still working with Access 2000 with no...
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    replied to How to update a table with vba?
    I much prefer to use CurrentDb.Execu te, but that's all personal preference. Here's a copy of a bit of code I use for logging:
    Code:
    CurrentDb.Execute ("INSERT INTO [tblFilterTemp] (strSQLCode, dtLastSearched, tmLastSearched) VALUES (""" & stringSQL & """, #" & Format(Now(), "MM/DD/YYYY") & "#, '" & Format(Now(), "HH:MM:SS") & "');")
    ...
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    started a topic Logging Changes to Table

    Logging Changes to Table

    Hello everybody, lonelyghost again. No major outline here since it's just a simple question that I have no idea how to phrase for a search engine.

    Program: Access 2000
    OS: Windows XP Professional SP3
    Problem: Recording the value and name of each control to a multidimensiona l array.

    Does anyone know an easy way to cycle through all of the controls on a form in VB? I already know how to do this:
    Code:
    Dim
    ...
    See more | Go to post

  • thelonelyghost
    replied to Subform RecordSource Error 3008
    This leads into an idea for further revision. I'm looking at using a For-each loop in SQLFilter() for FormToSQL() and setting up three arrays (arrFieldName, arrValue, arrOperator). Does anyone know if this would actually optimize the code, or would it just look prettier?

    EDIT: Just did some major code revision to carry out this idea and make it easier to implement JOINs in SELECT statement.
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    replied to Subform RecordSource Error 3008
    Successful testing resulted in me posting the revised code above. I also modified all dependencies on the old code to fit with the revision.
    See more | Go to post

    Leave a comment:


  • bump

    Did that help? Let us know.
    See more | Go to post

    Leave a comment:


  • thelonelyghost
    replied to Subform RecordSource Error 3008
    Source Code

    I finally have a compilation of the source code for the application I've been using. You do have to edit some of the code to fit to your situation, but that info lies between the labels "Begin User Settings" and "End User Settings", located at the beginning of SQLFilter() and BuildSQLStr(). Let me know if anyone has any questions, comments, or suggestions for the code. I'm more than willing to help!...
    See more | Go to post
    Last edited by thelonelyghost; Jul 16 '10, 06:42 PM. Reason: major code revision

    Leave a comment:

No activity results to display
Show More
Working...