Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. cdgeer

    DoCmd.SendObject question

    Thanks Andy, You got me thinking in the right direction. This is ultimately what I got to work: Private Sub cmdEmailRecord_Click() DoCmd.Echo False DoCmd.OpenQuery "EmailSubject", acNormal, acEdit DoCmd.Close acQuery, "EmailSubject", acSaveNo DoCmd.Echo True stEmail = DLookup("[Expr1]"...
  2. cdgeer

    DoCmd.SendObject question

    Could someone tell me if it is possible to populate the Subject line in an email with data from two different fields on a form? Can't figure out the syntax to make this work. Private Sub cmdEmailRecord_Click() DoCmd.SendObject acSendQuery, Req_CurRec, acFormatXLS, , , , Me.Requirement_No & "...
  3. cdgeer

    VB code not finding Table

    Cool! See... I never would have known how to do that. Thanks for the tip!
  4. cdgeer

    VB code not finding Table

    Thanks Duane, I caught the [Project_Version] mistake. But, I guess the whole problem was the Record_No As a String issue. As far as the Dim MPL As AccessObject... I thought that I had to declare the MPL table. Since the SQL code wasn't returning anything. I kept changing things around and at...
  5. cdgeer

    VB code not finding Table

    Thanks Duane, The number one worked. I am trying to run a query off of one form to populate fields on another and I'm having trouble with how to do it. The code works now but strangely the Tower , Project_Version, and Funding_Source fileds fill in right away but, after about 30 seconds or so...
  6. cdgeer

    VB code not finding Table

    Hi Andy, I get a "Too few parameters. Expecting 1." error. Then, when I debug, I get: [highlight #EDD400]Set rst = db.OpenRecordset(strSQL)[/highlight] and when I hover over: Set rst , I get: rst = Nothing
  7. cdgeer

    VB code not finding Table

    I am trying to create a Recordset using a SQL statement. I've done it before but, this time, it seems the SQL statement isn't finding the Table in the db so, it has an empty value for the Recordset. Help please? What am I missing? Private Sub cmdAddToReq_Click() Dim db As DAO.Database Dim...
  8. cdgeer

    Requery a form based on 3 cmbbox columns

    The cmbbx works as a filter currently but, only filters for one field.... Private Sub cmbProjNameFilter_AfterUpdate() Me.Filter = "[Project_Name] = '" & Me![cmbProjNameFilter] & "'" Me.FilterOn = True End Sub Private Sub cmbProjNameFilter_LostFocus() If Me.FilterOnLoad = False Then...
  9. cdgeer

    Requery a form based on 3 cmbbox columns

    Could someone please tell me how I would go about requerying a form and subform based on all three columns in a combo box selection. Basically like this: Form has txtbx1, txtbx2, txtbx3, cmbbx.column(0),(1),(2) subform When a user makes a selection in the cmbbx I want the whole form to...
  10. cdgeer

    Can't get update query to work with recordset values

    Thanks Andy! I didn't think of that. That saves another step. :) I'll definitely use that in the future!
  11. cdgeer

    Can't get update query to work with recordset values

    OK, Not sure how to do that. So I'm testing.
  12. cdgeer

    Can't get update query to work with recordset values

    Thanks Duane! I know none of the strings had spaces but, I put them in anyway and I think that leaving out the parenthesis in the WHERE statement and the -1 for the yes/no value did the trick. Works perfectly!!
  13. cdgeer

    Can't get update query to work with recordset values

    I'm having trouble getting an UPDATE query to pick up values from a recordset. When I run the code, I get parameter requests for the string values in the statement. When I go to Debug and hover over the string = rst![field] , it shows the value being picked up from the recordset but the SQL...
  14. cdgeer

    Using 2 forms to update table related to table behind another form.

    Thanks Duane! I got it to work with that last code you gave me. But, the problem I had was that I had the ControlSource of Record_No on the "ReDirect Reasons" form set to the Table ReDirectReasons.Record_No field. I had to make it unbound in order for it to work. So, now the problem is that the...
  15. cdgeer

    Using 2 forms to update table related to table behind another form.

    I tried this and it still doesn't work. Can't figure out why. Private Sub ProjStatus_AfterUpdate() If Me![Project_Status] = "Re-Direct" Then DoCmd.OpenForm "ReDirect Reason", acNormal, , , , , Record_No.DefaultValue End Sub ---------Then on "ReDirect Reason" form... Private Sub...
  16. cdgeer

    Using 2 forms to update table related to table behind another form.

    OK, I tried this instead... DoCmd.OpenForm "ReDirect Reason", acNormal, , , , , Record_No.Value Then on the OnOpen of "ReDirect Reason" form: Private Sub Form_Open(Cancel As Integer) If Not IsNull(Me.OpenArgs) Then Me.Record_No = Me.OpenArgs End If End Sub But, when I...
  17. cdgeer

    Using 2 forms to update table related to table behind another form.

    The third form is to provide additional details that correspond to each chkbox selected on the second form. So, I have 8 - (third forms). One each chkBox on the second form. I can't get the OpenArgs thing to work. I tried: Private Sub ProjStatus_AfterUpdate() If Me![Project_Status] =...
  18. cdgeer

    Using 2 forms to update table related to table behind another form.

    I have a main form named [Program Management] with a RecordSource of tblMPL with a primary key field [Record_No] which is also a txtBox on the form. On this main form I have a combo box where if the selection "ReDirect" is made then a second form opens [ReDirect Reason] which has a RecordSource...
  19. cdgeer

    Using SQL to create recordset then use those values

    Good point. I typically don't like to say never but, in this case, I know that these roles will not change or be added to. I will keep that in mind for future projects though. Thanks again.
  20. cdgeer

    Using SQL to create recordset then use those values

    Yeah, I was just trying to get results from the Administrator value first. The others should have been Boolean as well since they were all Yes/No check box controls. This is basically used as a kind of Access rights control. The GetLogonName() function compares the network login ID (NID) of the...

Part and Inventory Search

Back
Top