I have Compile Error on "open"
Private Sub Command16_Click()
Dim qdfCurr As DAO.QueryDef
Dim strPrompt As String
Dim strSQL As String
Dim Crei As String
'Input the random number of Year you want access
'by changeing the Step1_Member_Status query
strPrompt =...
I have form-one, that have ID field plus names.
I open form-two by command in form-one, i would like only records that have the id in form-one with other fields such as comments.
Now All comments show assoiciated with ID in form-one.
Thanks
Thanks Zion, TheAceMan.
Both of you have been a great help.
Final Code:
Private Sub Submit_Date_Exit(Cancel As Integer)
Dim strSQL As String
Dim db As DAO.Database
Set db = CurrentDb()
If IsNull(Me.[Submit_Date]) Then
Me.YearlyReqstID = ""
End If
strSQL = "UPDATE Requests" _
&...
Thanks all, this what it seems to be working:
But I have to go to next record and comeback for the feild to get updated. :(
Private Sub Submit_Date_Exit(Cancel As Integer)
Dim strSQL As String
Dim db As DAO.Database
Set db = CurrentDb()
strSQL = "UPDATE Requests" _
& " SET...
I have a field called A, when somone update the B field, I would like the A field get updated.
Note:
A is text, B is Date, RequestID is Autonumber
I wrote the below code but nothing is happening when i update the Submite Date field. :(
Private Sub B_AfterUpdate()
Dim strSQL As String
Dim...
I have a prompt text box, and I would like a person to enter Month & Year (eg, 022007) Instead of Month only! I tried to use the fromat date but it didnt work.
The code Below:
Public Sub Which_Year(ByVal strANDClause As String)
Dim qdfCurr As DAO.QueryDef
Dim strPrompt As String...
Thanks, but it not working.
Ok, All I need is the code the modify my query to include the
Cri = criName & IIf(criName > "", " and ", "") & criStatus
in the where condition for both date and Cri to be true.
Public Sub Which_Month()
Dim qdfCurr As DAO.QueryDef
Dim strPrompt As String...
That worked fine Thanks, but still didnt solve my problem: I want the Which_Month sub vlaue from the input box to be part of my CRI
Below is my code:
Private Sub Command11_Click()
Dim LBx As ListBox, criName As String, criStatus As String, Cri As String, DQ As String, itm
DQ = """"
Set LBx =...
I have the follwoing code: and I would like the month that is passed by the
input box be used in the second function as creteria.
Public Sub Which_Month()
Dim qdfCurr As DAO.QueryDef
Dim strPrompt As String
Dim strSQL As String
'Input the number of month you want access
'by...
i need some help to correct the below code.
Public Sub Check_Records()
Dim dbs As DAO.Database, qdfCurr As DAO.QueryDef, rst As DAO.Recordset, strSQL As String
Set dbs = CurrentDb
If QueryDefs("NAMEOFMYQRY").Recordset.RecordCount = 0 Then
MsgBox "There are no records...
For some reason it returns nothing? But it seems to work.
Cri = criName & iff(criName > "", " and ", "") & criStatus
Is it IIF or IFF.
Even when I change it return nothing
I have 2 list boxes that I need to use as my creteria to run a report from a
query.
The code below worked for the first list box, how can I add the second as
part of my cretieria?
Note, the first list box contain NAME, and the second list box contain STATUS
Thanks
Private Sub...
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.