Hi, catty1160
cSelected = "" (Why two double quotes here?)
Just initializing the variable to a empty string.
cSelected = cSelected & List1.Column(nCol, Item) & ";"
(What does this line mean and why double quotes with a semicoloun in the end?)
An unbound listbox (or...
Glad to be able to help. Thanks for the stars.
To obtain the detailed information using the last query, create another (yes... another) query :
SELECT Visits30.IdMember, Visits30.DateVisit AS [From], Visits30.Limit AS [To], Visits.DateVisit
FROM Visits INNER JOIN Visits30 ON Visits.IdMember...
if the bound column of the List box is the Id, you can use the following code:
"SELECT * FROM AnotherTables WHERE Id=" & ListName
if your listbox is multicolumn you can use any column value that you want:
"SELECT * FROM AnotherTables WHERE OtherField=" & ListName.Column(3)
I create an example table named Visits having the following fields (and your example data):
IdMember (Numeric)
DateVisit (Date)
1) Create the next query (named VisitsER) :
SELECT Visits.IdMember, Visits.DateVisit, [DateVisit]+30 AS Limit, (SELECT COUNT(*) FROM Visits AS NextVisits WHERE...
Try the following code...
Private Sub cmdPostToList2_Click()
cSelected = ""
For Each Item In List1.ItemsSelected
For nCol = 0 To 2
cSelected = cSelected & List1.Column(nCol, Item) & ";"
Next
Next
List2.RowSource = cSelected
End Sub
Use a recordset .... Something like :
Private Sub cmdButton_Click()
Dim rs as ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "SELECT * FROM AnotherTables WHERE ..."
If Not rs.eof then
fldArea = rs!Area
fldSide = rs!Side
fldmotion = rs!Motion...
You have filter is set to
"[Customer_Code] = Form_GetInitials.NewClientEntry
And must be:
"[Customer_Code] = Form_GetInitials.NewClientCode
and NewClientCode must be declared Public in GetInitials form.
OPTION A)
Declare NewClientCode as a Public variable in the first form :
Option Compare Database
Public NewClientCode
On the second form reference the variable as :
[Customer_Code] = Form_GetInitials.NewClientCode
OPTION B)
In the first form use the OpenArgs argument when open the second...
You need to force the afterupdate event when the user change to another record:
Private Sub Form_Current()
fieldx_AfterUpdate
End Sub
The afterupdate event ocurs only when the user changes the value (type something) of the field.
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.