Hello,
Using Access 2007, I have a table with 2 rows. Group and Product. A group can have one product (PPO or HMO), or both. I would like to get a new column that tells me if said group has both, HMO only, or PPO only.
From:
Group Product
A HMO
A PPO
B PPO
B HMO
C PPO
D HMO
E PPO
F PPO
To
Group...
I have a sub-form, in another form, that is the sub-form for a main form (form, sub-form, sub-form). The 3rd form is where a user enters the status of the record and associated notes. The status is via a combo box. I want this form to always have the status - that is the user cannot enter the...
I think it is a bug in my Excel. I have had issues recently trying to import an Excel to Access. Tried the same code on another users machine - worked like a gem!
Thanks for the tip on the error handler.
I took Dhookum's advice and replaced the field "Date" with "RunDate". I am trying to use the RunDate and another text field "TPID" in the update criteria. Both fields are text fields in the same table. Here is my current code:
Private Sub cmdAssign_Click()
Dim db As DAO.Database
Dim qdf As...
I am using the following code to format an Excel file that I am creating using:
DoCmd.OutputTo acOutputQuery, stDocName, acFormatXLS, XFile, False
Excel formatting:
******************************
Public Sub ModifyExportedExcelFileFormats(XFile As String)
On Error GoTo...
I have a slightly different variation on this. For the TP, I cannot consider that TP "closed" unless each record has a status (<> Null). This works so far.
I have to run a report that lists out all the TPs that have a status <> Null. However, if all the records have a status of "Cancel", I do...
Hi Andy - the (Environ("USERNAME")) worked.
I do have one more question though.
Here is my current update SQL code:
strSQL = "UPDATE ERM_FallOut " & vbNewLine _
& " Set Assigned = '" & Environ("USERNAME") & "' " & vbNewLine _
& " WHERE ERM_FallOut.SubId IN(" & strCriteria & ") "
I...
I have a table that has the following structure
TP RecordId Status
A 1 X
A 2 X
A 3 Y
A 4
Record 4 does not have a status. I would like to count how many records belong to TP A and also how many records for TP A have a status <> Null (or how many records have...
Here is the code that I am using.
Option Compare Database
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Function fOSUserName() As String
' Returns the network login name
Dim lngLen As Long, lngX As Long...
Thank you PH,
When I run the code, I get the message that records are being updated in the table. However, when I view the table, the Assignee field is blank. When I see the Immediate window, I see
UPDATE Table1
Set Assignee = ''
WHERE Table1.SubId IN('OPQ','RST')
Also, my update query...
I was able to use Fontstuff's Multi-List query (was easier for me to follow) at http://www.fontstuff.com/access/acctut11.htm and modified it to be an update query - it worked!!
However, I am trying to further tweak it as such:
strSQL = "UPDATE Table1 " & vbNewLine _
& " Set Assignee =...
Hi Andy - I was able to convince the user to go with the multi-select box!
However, when I try to run the code to test, I get the message "Method or Data Member Not Found" for "strIN = Split(ListBox1.List(i), " ")(0)" - the .List is highlighted.
I am not sure what to do to troubleshoot.
I am...
I think the issue with that approach is that the user will still have to click each record (so if they are picking 10 records, they will have to click 10 times). I am trying to cut-down on teh key strokes and have them simply enter 10 and have 10 records assigned to them.
My stretch goal would be to have a text box on the form where the user can enter the number of records they want to select (or a combo box).
Alternatively, I was going to put 4 buttons on the form that say "2", "5", "20", "All".
Andy - thanks for the SQL. In that statement, how will I control that the user wants to select the top 2 records only. What if someone wants to select top 3 or top n?
And in the way you have it, will it update all the subscriber records (let's say they have 3 errors for each sub) with the assignee?
Thanks Andy!
Well to prevent the user from only picking those subscribers with less errors, I am not displaying the errors or the error count. I have a query that is grouping the subscriber Ids under each Cust_No and displaying this. So when the user says, "I want to assign the top 2 subs to...
Andy - your layout is exactly what I have. What I would like the user to be able to do is:
If they select "Top 2", then the subscriber Id 1 and subscriber Id 2 (with error 1, 2, 3, 11, 21, and 31) should be updated to show the user as the assignee (there is a field called "Assignee" in the same...
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.