How can I show a MS-Access listbox row highlighted? I'm using MS-Access 2007. I want the first row of a multiple-column listbox to be showed highlighted through VBA.
I tried Me.LstSample.Selected(0) = True, but it doesn't work.
The code:
Private Sub LstStation_AfterUpdate()
With Me.LstSample
If IsNull(Me.LstStation) Then
.R...
What's the "best" way to read (just read) an Excel file from within an Access 2007 application. I only want to loop trough the rows and put the data into an Access table.
I don't want a import by hand (Get External Data dialog) but by VBA. The user gets a Form with a Browse button and then points to a Excel file with a defined content/f...
Lately there has been a problem running some of our reports in access. Last week(the beginning of the week) we tried to run a reports lets call it A and it kept giving us the log in prompt. Even when the correct user-name and password were entered the log in box would just keep reappearing until cancel was pressed.
I clicked the debug an...
I have a datasheet that looks like this:
ID name_ 1 2 3 4
1 name1 x 0 0 0
2 name2 0 x 0 0
3 name3 0 0 x 0
4 name4 0 0 0 x
I have rectangles on a report that correspond to this datasheet.
When the report opens, I need the rectangles to be colored red according to the data. For example, ...
i need all the rectangles on my form to be red when the report opens. how do i do this?
here's my code:
Private Sub Report_Load()
For Each ctl In fill_boxes.Controls
If ctl.Name = acRectangle Then
ctl.Name.BackColor = "#ED1C24"
End If
Next ctl
End Sub
i get an error OBJECT REQUIRED on t...
Hi all, I have this generic routine that I wrote that takes a list of sql strings and executes them against the database. Is there any way I can make this work faster? Typically it'll see maybe 200 inserts or deletes or updates at a time. Sometimes there is a mixture of updates, inserts and deletes. Would it be a good idea to separate th...
Abstract:
I'm using VB to recreate a query each time a user selects one of 3 options from a drop down menu, which appends the WHERE clause If they've selected anything from the combo boxes. I then am attempting to get the information displayed on the form to refresh thereby filtering what is displayed in the table based on user input.
...
I need to document a MS-Access application that was created, developed and maintained completely by a power-user over 10 years.
This is an interesting situation because what they want is a manual so that a future developer can come in without prior domain knowledge and make changes to the frontend or the backend in a timely manner.
T...
I'm experimenting with Lotus private views for the first time and I finally made a private view that (more or less) has the data I want. I just need to get it into MS Access.
If this was a standard shared view, I'd just fire up the ODBC administrator, and make a DSN to the database using the NotesSQL driver. Been there, done that. But...
Hi how do I get the data by current week?
Select * from Transaction where transactionDate ....
...
Everytime I open my mdb copy to work on something, I get this little warning label that some somethings have been blocked....click this button to un block? anyway I can default that off?
thanks
justin
...
So I have a form that user's use for data entry, and on one form there is a text box there that is basically used. To enter notes. However, if the user hits i need the cursor to stay in that text box, and start a new line (uh....like word would)....but currently it is jumping to the next control (text box).
So is there a simple proper...
I have a record set for inspections of many peices of equipment. The four cols of interest are equip_id,month,year,myData.
My requirment is to have EXACTLY ONE Record per month for each peice of equipment.
I have a quiery that makes the data unique over equip_id,month,year. So there is no more than one record for each month/year for a p...
So there are 8 categories that may be associated to each order, but not necessarily all of them. So i was going to build a list box that allowed the user to double click each of the category they wish to associate when they have an "Order Detail" form opened up (unbound form that has hidden text boxes with all needed ID numbers).
I want...
In Access, I have a columnar form (one record per page).
I want to copy what is there and paste it into Word. The trouble is that when I paste, it converts to a table. For example...
Here is my form:
Field 1: [Value]
Field 2: [Value]
Field 3: [Value]
When I paste, I get:
Field 1 Field 2 Field 3
[Value] [V...
While perusing an application that I'm documenting, I've run across some examples of bang notation in accessing object properties/methods, etc. and in other places they use dot notation for what seems like the same purpose.
Is there a difference or preference to using one or the other? Some simple googling only reveals limited informati...
I have three tables related to this particular query:
Lawson_Employees: LawsonID (pk), LastName, FirstName, AccCode (numeric)
Lawson_DeptInfo: AccCode (pk), AccCode2 (don't ask, HR set up), DisplayName
tblExpirationDates: EmpID (pk), ACLS (date), EP (date), CPR (date), CPR_Imported (date), PALS (date), Note
The goal is to get the dat...
I want to insert Values to access table by using VBA control is there is any simple way to do this. i try this code but it does not work properly if i run this code it give the error 'variable not set' can anyone help me. thanks in advance
Private Sub CommandButton1_Click()
Dim cn As ADODB.Connection
Dim strSql As String
Dim lng...
Hi all,
I have a sql server database that several websites use. Now the customer wants this to be linked to an Access2007 program. Ive created a datasource file etc and have the tables linked to the database just fine. What I need is for the relationships between the tables to be able to create dropdown lookups so that when a user wants...
Where is the error in this statement?
query = "DELETE TOP 10 FROM table WHERE field LIKE \"something*\""
I get an error on the query sytax.
Thanks.
...