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]"...
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 & "...
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...
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...
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
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...
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...
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...
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!!
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...
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...
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...
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...
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] =...
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...
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.
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.