Hi Access-Friends,
I'm asking myself for 4 hours how can I run a query and save the result in a variable? I'd like to place it in the Form_Open event, because the user shouldn't notice that).
The variable is Boolean.
Could someone give me a small/big hint how to do it?
Many, many thanx in...
It works, but not perfect...
O.K. This code works BUT if I use the shift and chose e.g. the 1st and 3rd items, I got the message 'subscript out of range'?
Does anyone knows why?
For Each k In Me![List0].ItemsSelected
countselected = countselected + 1
Next k
ReDim myarray(0 To...
Hi Access-Friends,
I want to run a query and show the result in a listbox. Does anybody know how to do it?
Here is what I have:
....
(multiselect from a listbox)
.....
Set DB = CurrentDb()
'Set Q = DB.QueryDefs("Query11")
Q.SQL = "Select Field1 From Table1 Where [ID]=" & Criteria
Q.Close...
Hi,
I'm trying to show the notepad icon on my form. The code below is the result approach.
Anyway, it doesn't work... I don't know how to refer to the hInst and hDC (see question marks). It should be the application object and form object... I'm trying, trying...
Many thanx for any suggestions...
the thing is, that the 'selected'-property...
lets the field appear in black (like I said, it just a piece of sec.). The colors etc. work perfect, it's just this stupid selected color.
I have a field (listbox) that shows we the value of a query. If the amount is negative, it should appear in red.
I've solved the problem using the select property, but the field appears black (it's maybe less then 1 sec. but the user can see it).
-Do you know other way, how to retrieve a data...
I've got the following code, and want to enable/disable a command button dependent on the value in the list. I don't know why, but it doesn't work (I guess it's maybe because of 'null'?)
I would appreciate your suggestions.
Key
Me!List1.Selected(0) = True
If Me!ListItemData(0) = Null Then...
How I can find a record whose key are 3 different fields?
dim var1 as integer, var2 as integer, var3 as integer,
var1 = cmbCombo1.Column(0)
var2 = cmbCombo2.Column(0)
var3 = txtJan.Value
var4 = ????????????????
(& doesn't work)
..........
........
rs.findfirst var4
.........
.......
I want to import an Excelspreadsheet to my database and want to delete the first three raws from this spreadsheet (IMPORTANT: before I've imported the file)
Thanx
Key
Hi!
I show the result (sum) of a query in the ListBox . Now, I want to show the result red (if the sum is negative) or blue (if the sum is positive).
Is there any way to do it? How do I refer to a result of the query in VB?
Thanx,
Key
Hi All,
There are a predefined functions like MoveFirst, MoveNext etc. in Access. Nevertheless, I've a problem...
On my Form1 there is a ListBox. I click on the ListBox, a new Form2 opens and I've to TextBoxes: Name, Number (values taken from the ListBox - see below).
Now, I want a...