Search results

  1. M

    multi-valued variables intVar(1)=X intVar(2)=y

    That's because you're using lstFiles as the counter source and you are deleting from it, thereby nullifying the value of MyCounter. Change it to a two-step process. Go through and add everything to list2, and then go back and remove from list1. A much easier to handle this would be to have...
  2. M

    multi-valued variables intVar(1)=X intVar(2)=y

    Here's how to get through all the items in a listbox. You should be able to take over from here. For ctr = Me.lst_Files.ListCount - 1 If Me.lst_Files.Item(ctr).Selected Then Debug.Print "Item " & Me.lst_Files.Item(ctr) & " is Selected" End If Next
  3. M

    Subtracting two date fields, result in a third

    No need to iterate through anything. A simple update query will do it: CurrentDb.Execute "UPDATE tblLog SET DaysToProcess = DateDiff("d",[IntakeDate],[CompletedDate]);" You can just copy/paste that into the immediate window and press enter and it'll do it for you. EDIT: Paul is right in that...
  4. M

    Set rst = db.OpenRecordset() Help!

    Are you replacing query_name with the name of your query, and ParameterField with the name of the field in the query that is the parameter? If not, that's two parameters missing in the SQL Select statement.
  5. M

    multi-valued variables intVar(1)=X intVar(2)=y

    Using an array to do what you're doing is making it far too complex. Removing items from a listbox just isn't that hard. What exactly is the code you're using?
  6. M

    Set rst = db.OpenRecordset() Help!

    Change this: Set rst = db.OpenRecordset("query_name") To This: Set rst = db.OpenRecordset("SELECT * FROM Query_Name WHERE ParameterField = '" & YourFormControlName & "'") Or, if your Parameter field is numeric: Set rst = db.OpenRecordset("SELECT * FROM Query_Name WHERE ParameterField = " &...
  7. M

    Newbie Import/Export problems Please help!!!!

    The process from going Company to Batallion, and then Batillion to Brigade is identical, so I'll do the first one for you. 1) We want to update the company members that already exist in the batallion, so using the SSN, we look for matches between the two tables using a left join: UPDATE...
  8. M

    multi-valued variables intVar(1)=X intVar(2)=y

    Lookup Collections in Access Help. In short, a Collection is similar to an array, but doesn't have a predefined size (and you need that feature, according to your description), and it can accept multiple data types (text, numbers, etc.) whereas an Array has a predefined size and only accepts...
  9. M

    Newbie Import/Export problems Please help!!!!

    So long as you have a SoldierID of some sort that's common to the table(s) where you are either updating or appending, this is easier than you think. Before I delve into that, do you have it structured that way already?
  10. M

    qry 2 tables in same field

    How are the two tables joined? If they aren't, there's your problem. You want something like this: tblBaClassSchedule tblBaStudentHistory StudentID --> StudentID Status EnrollmentStatus . . (other fields) (other fields) ...
  11. M

    multiple values in 1 form

    This is code that would go in the click event of a Command Button named cmdCheckFields: Sub cmdCheckFields_Click() Dim strFieldChecks As String strFieldChecks = strFieldChecks & Switch(Nz(Field1,"")="","Field1" & vbCrLf, True,"") strFieldChecks = strFieldChecks &...
  12. M

    multiple values in 1 form

    strFieldChecks = Field1 & Field2 & Field3 & Field4 & Field5 & Field6 If Nz(strFieldChecks,"") = "" Then MsgBox "All fields must be entered before continuing" Else --- All fields have something in them --- End If
  13. M

    delete query

    It sounds like you're using a DoCmd here, in which case you'd put it like this: DoCmd.SetWarnings False --- Your DoCmd for the delete query here --- DoCmd.SetWarnings True The other way around this is to use CurrentDb.Execute, which doesn't require you to turn off the warnings...
  14. M

    Linking to .CSV file

    Is there a reason you can't just import this table? All the Transfer actions (TransferText, TransferDatabase, TransferSpreadsheet) are pretty unreliable except under very specific conditions. I know that there are some unlisted limitations, and these functions typically have memory leaks as...
  15. M

    unbond text connect with two tables

    Me.ControlSource = ""
  16. M

    Transferspreadsheet

    If you're appending to table Test and Test already has data in it, you don't want to get rid of your already imported data (most likely). So, the order is: 1) Delete data in Temp as shown 2) Import into Temp 3) Append to Test And yes, all under one button. If you do want to clear the...
  17. M

    Exit ACCESS

    More fun when it's a simple oversight instead of a huge issue. Glad it worked. :)
  18. M

    RMA database needed

    And what have you tried? Where are you stuck? In a simple outline: 1) You sell a steel casting with ID# ABC123 2) For some reason, Joe Blow decides it's not what he wanted and wants to return it. 3) You look up ID# ABC123 on an RMA form. On that form is the original sale date, price, etc...
  19. M

    Menus - gone....

    Do the menus in all the other apps (Word, Excel, etc.) appear? Also, not to be accusatory, but is this a legitimate copy of Office or a "borrowed", downloaded, or otherwise obtained in some unintended way copy? Also, in Access with the blank menus, can you get to the code window by pressing...
  20. M

    Queries using tables w/o links

    This is probably going to involve a pretty big redesign, but before I go down that road, what is your definition of "really slow"? Initial observations (and please format the SQL in the future): SELECT DISTINCT DSSAPP_FULL_WIP_PROD_STATS.LOT_NUMBER...
Back
Top Bottom