Search results

  1. Drevlin

    movesize syntax

    That last statement is actually incorrect. The width and height are optional and thus the original: Is actually close. You only leave comma's in when there is more information after. Correct way: DoCmd.MoveSize 10,10 Peace
  2. Drevlin

    Using a field Value in Place of acTextBox, etc

    I think it actually does. I have one (i think) more thing I think I need to understand though. What exactly does your rst.Fields Consist of? Is one of the rst.Fields.Name = DoorNumber So that if you went to your code and placed the appropriate information in the line: Set ctlControl =...
  3. Drevlin

    automatically filling in field if left null

    I wouldn't worry about changing the field name or any of the other controls until it becomes necessary, as in the case for this particular control. I go with the whole: "If it works. Don't fix it" mentality. As for how you would go about doing that if it did become necessary...? I'd like to...
  4. Drevlin

    Using a field Value in Place of acTextBox, etc

    Do you mean that you want the actual value of the acTextBox constant? like: acTextBox = 109 acComboBox = 111 if you want to know the actual value of a constant just run it through Debug.Print Sub whatNumber() Debug.Print "acTextBox = " & acTextBox Debug.Print "acComboBox = " & acComboBox End...
  5. Drevlin

    automatically filling in field if left null

    Try to change the textbox control's name to something other then Part# (i.e. txtPart). The problem seems to be with the # sign. Using it at the end of a word in VBA is the same as declaring a variable type double. In this case VBA is reading Part# as if you had type: Dim Part as Double Try...
  6. Drevlin

    How do I call a sub routing with a control button?

    Private Sub Command01_Click() mySubFunction End Sub Command01 of course would be the name of your command button. And mySubFunction would be the name of the Sub your calling. Also, make sure that the Sub you are calling is a Public Sub and not Private to another form. You may have to post...
  7. Drevlin

    Data Mismatch error

    try changing to: Dim fld As Obj Actually now that I'm looking at it wouldn't you want the for each to read like this: For Each fld In rstSelectedField.Fields ctlName = fld.Name Set ctlControl = CreateControl(frmTakeoff.Name, acTextBox, , , ctlName, intDataX, intDataY) 'Create child label...
  8. Drevlin

    Save As FileDialog

    Any of the file pickers will do what you want. All they do is pass you the file's location string anyway. The following code will give you an array of file names (Access 2002 ): With Application.FileDialog(msoFileDialogOpen) .AllowMultiSelect = True .InitialFileName =...
  9. Drevlin

    Code for emailing - problem.

    OK someone else answered your question before I got to it... But I'm going to post this anyway just to give you a different idea on how to do this. I'm going to go under the assumption that if the txt*b is empty then txt*c and txt*f is empty. I would try something like this: Private Sub...
  10. Drevlin

    Email problem with Lotus Notes

    I personally don't use Lotus Notes, but like many popular programs I assumed that it supported OLE Automation. I did a quick Search on the internet and found this site: http://www.lotus.com/developers/devbase.nsf/data/document1719 It contain's a word document that shows an example of OLE...
  11. Drevlin

    Buy a book

    I personally use Access 2002 VBA Handbook by Susann Novalis and Dana Jones. Published by Cybex. It's $60.00 but it does come with a CD (not that I use the CD). I use it often as a resource book. Especially when dealing with ADO/DAO. (It's just too hard to remember the exact format for...
  12. Drevlin

    MAX and LAST Not Returning Correct Record

    It may be slightly annoying... but you could build your query in two steps (actually two queries). The first query would be: SELECT tblActivity.ActivityID, Max(tblActivity.ActivityDate) AS ActivityDate FROM tblActivity GROUP BY tblActivity.ActivityID ORDER BY Max(tblActivity.ActivityDate) DESC...
  13. Drevlin

    Select Case Question

    I wouldn't suggest scrapping anything. It's just hard to problem solve your situation without knowing all the factors involved in what your doing. Perhaps you could post (or email me directly) an example of your database (feel free to gut it of any information that shouldn't be passed along...
  14. Drevlin

    Does 'esc' key post an event?

    This question has almost the same answer that I gave to Full_Williams. In your Form's Preferences go to the Event Tab and change KeyPreview to Yes. This will send any Key presses to the form itself. Then for the form_KeyPress event you would test for the Esc key: Private Sub...
  15. Drevlin

    Editing records in code- Now this is a problem worth solving ;)

    Ok... I'm coming in at the Way tail end of this and the furthest I've gotten with your code is the: part. So I might be WAY off base here... but if your code in your database matches the code you have in your first post the problem I see is that stSQL equals: UPDATE [Dueorders] SET...
  16. Drevlin

    Tab Order from Form Header to Detail

    I wouldn't do what your asking because Alt+Tab is the key combination that switches between programs in Windows and it would be complicated to override this function. If it weren't for this fact it would be possible to do what your asking but not quite as you have it. The Procedure for the...
  17. Drevlin

    Tab Order from Form Header to Detail

    Ok, the scenerio is the same. You have five text boxes in your Header labelled text1, text2... text5. You have 5 text boxes in your Detail: text6, text7... text10. This would be your code to tab either direction: Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) 'If your in...
  18. Drevlin

    Tab Order from Form Header to Detail

    You could put a focus call in your onExit of the last control in your header and detail. sub Text5_Exit() me.Text6.SetFocus End Sub Set Text10_Exit() me.Text1.SetFocus End Sub ***** This examples assumes you have text boxes 1 through five in your header and text boxes 6 through 10 in your...
  19. Drevlin

    Select Case Question

    I'm thinking that Travis probably deserves your gratitude far more then I do, I just told you to change a word. If I understand what your asking correctly, I wouldn't use a form. I would write a query that does what your wanting. You can use the Function that Travis gave you (just place it...
  20. Drevlin

    Select Case Question

    Ok, since my last comment didn't work... try this. Change the: to: Private Function funActiveStatus(ByVal CurStat as Variant) as String This should make your "Select Else:" work with an Empty Value. At least it did when I tested it. Or if you want the Empty Value to do something...
Back
Top Bottom