How to include form data in subject of SendObject
SOLVED!!! I did a Subject = "Your Order " & Me.OrderID and it worked.
User Profile
Collapse
-
Last edited by Niheel; Jul 8 '10, 08:23 PM. -
How to include form data in subject of SendObject
I have a form that the user fills out. When they hit the 'submit' button it not only saves the record, but it emails the info from the form in a report. The form/report has an 'Order ID' field. What I would like to do is in the subject line of the email have it say "Your order "+Order ID. I have tried a couple things under Subject like Your Order &Forms![My Form]![Order ID], but it didn't work. I know this is probably easy to do, maybe... -
-
How to access random number question (Not random at all)
So just a quick question; more out of curiosity than anything. I have a form in which I pop a random number into a text box. Eventually that number will be placed by a user using a scale, but I wanted to simulate that now. Anyway, I used this code:
I assumed that will give me a random number, however EVERY time I launch my form the random numbers are the same. First 'random...Code:MyWeight = Int(1000 * Rnd())
-
Update: Solved. Not the best thing to do I guess, but I just refreshed the form once the data was passed.
...Code:Private Sub Command26_Click() Me.Status = "Assigned" DoCmd.Save DoCmd.OpenForm "Task Details", acNormal Forms![Task Details]![Title] = "Work Order" Forms![Task Details]![Start Date] = Now() Forms![Task Details]![Employee] = Me.AssignedTechLeave a comment:
-
By the way, here is the SQL statement I am trying to use to insert from this form into the Tasks table.
This is not working obviously and...Code:DoCmd.RunSQL "INSERT INTO Tasks ([Title], [Status], [Start Date], [Employee], [Assignment], [WOID]) VALUES ( 'Work Order', 'Assigned', Now(), '" & Me.AssignedTech & "', '" & Me.Description & "', '" & Me.WOID & "');"
Leave a comment:
-
Here is a quick video I took to show the issue.
http://www.youtube.com/watch?v=VSGBDQqp4FY
Jerry - I don't think I can change that to =Forms![Work Orders Status]![Description] simply because not only do I pass info to that form, I also enter directly to that form. Does that make sense? Maybe I can do it. Let me try and see if it errors out.
Also, I want to take the data from the 'Work Orders Query' form (the...Leave a comment:
-
So I replaced the control for Assignment - no change. Both controls are set to 'Memo'.
NeoPa - I sort of misspoke. The 'Me.Description ' is coming from a form named 'Work Orders Status'. I am passing that data to a form named 'Task Detials' where it is reviewed and then placed into the table 'Tasks'Both controls are Text Boxes.
I cannot figure this one out for the life of me.
I suppose I could just submit...Leave a comment:
-
Passed text doesn't appear until cursor is in Textbox
So all I am doing is passing data from one from into another.
...Code:DoCmd.OpenForm "Task Details", acNormal, , , acFormAdd Forms![Task Details]![Title] = "Work Order" Forms![Task Details]![Start Date] = Now() Forms![Task Details]![Employee] = Me.AssignedTech Forms![Task Details]![Assignment] = Me.Description Forms![Task Details]![cmdClose].SetFocus -
Hey Linq, thanks for the reply. Thanks for the link. It may provide an easier way of doing it. I solved it by creating the report from a query in which I pass the Where data to the query from the form. Seemed like a hard way to do it so maybe Allen has a better way. Thanks for the reply!! I appreciate it.Leave a comment:
-
Print report of current data on form
Not sure how to word this as I am somewhat new to Access 2007. What I am trying to do is the user fills out a form, when he hits the "save record" button I want it to save the record and print a report based on the information that was just entered. It is actually going to print a 4x6 label to use on a container. That label will contain the info that the user just filled out on the form so I need to format the report to fit on the label.... -
Thank you so much gnawoncents!! The old position of the +1 mistake. It's working perfectly. Thanks again....Leave a comment:
-
Query between dates issue (inclusive)
I am at my wits end. Why is this not simple? So I am trying to query records that fall between two dates, but the ending date is not showing up. So, if I want to see if there is data for today my stopping date has to be tomorrow. Here is my SQL:
...Code:SELECT Tasks.[Start Date], Tasks.[Parts Used] FROM Tasks WHERE (((Tasks.[Start Date]) Between Forms![Parts Used Report]![Start Date] And Forms![Parts Used Report]![End Date]))
No activity results to display
Show More
Leave a comment: