Search results

  1. G

    SQL as row source for a combo box

    I new it was something simple like that. Thanks BryanT.
  2. G

    SQL as row source for a combo box

    Hi all, This is probably simple but here it goes: I have a simple SQL statement as the row source for a combo box. The statement pulls the year from a date field. Every record has a date ranging from 1999 to date. The problem I'm having is that the year repeats as many times in the combo box as...
  3. G

    Getting the value for the next field

    Thank you, that was simple.
  4. G

    Getting the value for the next field

    Hello all, I was wondering how to do this: A table has users and levels for the users. I have the following line of code: Criteria = "[User] = '" & Environ("UserName") & "'" This line searches for the username in the table just fine. The following field in the record is "level" which can be...
  5. G

    Code Acting Up

    Hello All, Can anyone tell me why the following code is closing the database? This code sits behind the After Update event of a combo box: Private Sub cmbDefect_AfterUpdate() On Error GoTo RptErr 'Search for claims in the Film_Claims DB If Me.cmbDefect = "Curl Issues" Or Me.cmbDefect =...
  6. G

    Displaying subrecords

    Thanks for your replies. I was working on something similar to Pat's second suggestion but I was thinking on putting it to rest in light of a better way. I guess this is one of them. Thanks again guys. I'm sticking to it. George
  7. G

    Displaying subrecords

    Hello all, What is the best way to display subrecords or related data when using a subform in datasheet view? I have a main form which has the subform in datasheet view. This subform displays my records. I would like to display other related data somehow somewhere but I'm not sure of a way to do...
  8. G

    How to build a number?

    Thanks Wayne, That works well. It is unfortunate though that the people who owns the DB are resisting to change the number. I did bring up the suggestions you and Pat brought out but there is some resistance. So, for the time being I'll stick to this method until they move on to other methods or...
  9. G

    How to build a number?

    Thanks Pat, Regarding DMAX, I figured that much, what ca I do so that it ignores letter values? Now, what do you mean by "add a new primary key"? I am not using these numbers as the primary key. They are just document numbers. The primary key is an autonumber. They are planning to get rid of...
  10. G

    How to build a number?

    Thanks for your replies guys, What kind of number? Well, the standard is to follow the previous number regardless of letters, it is only in rare instances when I need to enter 'INFO' instead of a number or to append a letter to the end of the number. That part would have to be done manually and...
  11. G

    How to build a number?

    Hello Wayne, The number has to follow the sequence from a DB I inherited at work. So, the number has to be a four digit number, presently at 9400. Next number would have to be 9401...There are situations when I skip the number for that record and I just use the word "INFO" in its place. Yet, in...
  12. G

    How to build a number?

    Hello all, I need help building a number. My table has a field which can hold any of three values: 1. a four digit number incremented by one or 2. a combination of a four digit number plus a letter at the end or 3. the word 'INFO' I want to be able to generate the next available number. I have...
  13. G

    Check my code please

    There are only four text boxes. I removed the code to change records just to debug to see where the code is breaking. By doing that I found out that I get error "438:Object doesn't support this property or method" after the first cell has been writen then skips one cell and writes on the next...
  14. G

    Check my code please

    If I have 4 text boxes in my subform (childfrmMstrRollInfo), why this code is exiting after it exports the value of the first one only? Dim ctl As Control Dim intRow As Integer, C As Integer, R As Integer Dim chrColumn As String intRow = 22 chrColumn = Chr(67) For Each ctl In...
  15. G

    Check my code please

    Yes Mile-O-Phile, this is just that section of code that takes care of a subform. The rest of the code takes care of the main form. I have the following at the beginning of my on_Click event: Dim ExcelApp As Object Set ExcelApp = CreateObject("Excel.Application") With ExcelApp...
  16. G

    Check my code please

    Thanks Mile-O-Phile, I fixed the code a bit but it still hangs when strColumn = E and intRow = 22. I just dont' understand why it won't go further than that. Here is the code: Dim ctl As Control Dim intRow As Integer, C As Integer, R As Integer Dim strColumn As String intRow = 22 strColumn =...
  17. G

    Check my code please

    I want to loop through the fields in a subform, grab the values and dump them in a spreadsheet by way of the above code. Aside from declaring all my variables and things like that, would that loop work as is or do I need to make changes to it?
  18. G

    Check my code please

    Any takers on this?
  19. G

    Check my code please

    Sorry to be so vague about it. The code is just a section of the whole. What this part does is populate a spreadsheet with with the values of a subform on my main form. It is supposed to loop through each field in that subform and move the values to a cell in the spreadsheet. All my variables...
  20. G

    Check my code please

    I have this piece of code: ----------------------------------- Dim Row, C As Integer Dim Column As String Row = 22 Column = Chr(67) C = 0 While Counter <> 9 For Each Control In Me.childfrmMstrRollInfo.Controls .Range(Column & Row).Select .ActiveCell = Control.Value C = C + 1...
Back
Top Bottom