User Profile
Collapse
Profile Sidebar
Collapse
morganaj
Last Activity: Dec 16 '14, 02:26 PM
Joined: Oct 9 '13
Location: Saskatoon, SK, Canada
-
morganaj replied to SQL "SELECT INTO" to Copy Sponsor Contact Info to Manager Info if they are the same.in AccessI tried that. The first time still produced a successful message without actually copying. The second time it went over. I didn't get an error message either time. -
morganaj replied to SQL "SELECT INTO" to Copy Sponsor Contact Info to Manager Info if they are the same.in AccessSo this is working kind of. If I click it once it runs without an error, but will not copy the information. But, if I click it a second time it usually will copy it.
I'm not sure if this has to do with my SQL, but I assume probably. I also removed the from clause, as until a record was created it didn't have a SHC_No which is the primary key that is linked to the form. This seemed to work... like I said not 100% of the time. And I'm...Leave a comment:
-
morganaj replied to SQL "SELECT INTO" to Copy Sponsor Contact Info to Manager Info if they are the same.in AccessThank you Seth, that ran the SQL without error. Though I also had to remove the quotes around FROM. I forgot that it was a statement SELECT x FROM x.Leave a comment:
-
morganaj started a topic SQL "SELECT INTO" to Copy Sponsor Contact Info to Manager Info if they are the same.in AccessSQL "SELECT INTO" to Copy Sponsor Contact Info to Manager Info if they are the same.
Hello All,
I have a form to enter contact information, and often the sponsor info and the manager info is the same contact info. I am trying to use VBA to copy the information over to save me a bunch of time.
This is what I have:
...Code:Private Sub Command28_Click() 'VBA to copy all manager info to matching sponsor. On Error GoTo Err_Button_Click Dim ssql
-
morganaj replied to Access 2007 - Select Query w/User-entered Parameters - "Is Null" or "Is Not Null"in AccessI figured this out by crawling around the depths of the Internet.
Either in the criteria section of the query builder use:
This states that if the Parameter is null to use a wildcard to return all fields, else use what was entered by the user.Code:Like Iif(IsNull([PARAMETER NAME TO POP]), "*",[PARAMETER NAME TO POP])
You can also edit in the WHERE clause of the SQL:
...Code:WHERE FieldtoFilter
Leave a comment:
-
When you build your query, you have to either build in parameters (criteria section) to filter the query that feeds to the report.
Alternatively in the criteria sections you can enclose a string in square brackets, for example:
[Enter What you are hoping to filter]
This will bring a modal pop-up to have the user enter the criteria to filter on. I hope this makes sense. Let me know if you have any more issu...Leave a comment:
-
morganaj started a topic Access 2007 - Select Query w/User-entered Parameters - "Is Null" or "Is Not Null"in AccessAccess 2007 - Select Query w/User-entered Parameters - "Is Null" or "Is Not Null"
Hello Ladies and Gents,
I have created a query in MS Access 2007. I want to be able to have the user define more than one parameter. If I have only one parameter AKA Year or PMC Name, the select query runs fine. But, I would like the user to have the option of defining more than one.
But wait, its more complicated. I also want the user to be able to not define the parameter (leave it blank) to retrieve all the years... -
Also to solve your rounding issue you can use, which rounds to two places:
Whatever you put as a value of AnyNumber is the decimal places to round to.Code:Expression Name: Round(([Value1]+[Value2]),2)
Code:Round(NumbersOrExpression,AnyNumber)
Leave a comment:
-
Hey zmbd, thanks for the help. I figured it out.
Apparently the syntax wanted a literal space to make it run properly.Code:"SELECT TOP" & " " & Me.strPercent & " " & " PERCENT
Thanks for the help!Leave a comment:
-
When I try to change the SELECT statement to include the variable, that you suggested.
...Code:strSQL = "SELECT TOP" & Me.strPercent & "PERCENT tblTemp.SHC_No, tblTemp.Project_Name, tblTemp.Program_Type, tblTemp.PMC " & "INTO " & strTableName & " " & _ "FROM tblTemp " & _ "ORDER BY tblTemp.RaLeave a comment:
-
Using a form to input for TOP x PERCENT in VBA
Hello,
I am trying to use this form:
[IMGnothumb]http://i.imgur.com/06RWh0Y.jpg[/IMGnothumb]
to select a program type and generate a random list to audit. This part is working correctly. But I would like to use a variable either a number or a percent to input as the TOP x PERCENT|NUMBER in my SQL statement from the form.
My code looks like this:
...Code:strTableName = "tblAuditSample_"
-
morganaj started a topic VB Coding - Combo Box Auto Populate Error - Trying to select an item in a combo box tin AccessVB Coding - Combo Box Auto Populate Error - Trying to select an item in a combo box t
Hello,
I am trying to get it so on after an update of a combo box that three other fields are to be filled in.
I have the Control Source set to the Primary Key field of the table for the Contact.
With the Row Source Type set to Table/Query. It is based off a query with the first field in the grid the primary key.
I have set the properties to:
Bound Column should be 1
Change...Last edited by zmbd; Oct 9 '13, 05:35 PM. Reason: [Rabbit{Please use [CODE] and [/CODE] tags when posting code or formatted data.}][z{placed [/code] tag at end of block}]
No activity results to display
Show More
Leave a comment: