Run-time Error: An arguement topdate function was invalid. The field name must be provided as a string value in quotation marks.
I have never got this before. I have this same code on other forms, but using other tables and it works just fine.
Private Sub lstSearch_AfterUpdate()
Dim rs As...
Having a an issue and not sure how this is happenning because I have used this code in a lot of forms.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[OwnerID] = '" & Me![lstUsers] & "'"
Me.Bookmark = rs.Bookmark <---- error is here for the datatype mismatch or No record found...
I am not sure why i am gettting a compile error, type Mismatch. Maybe my brain is fried and I cant see it.
Dim uName As String
Dim strfName As String
Dim strlName As String
Dim db As DAO.Database
Dim rs As DAO.Database
Dim iSQL As String
uName = CStr(fOSUserName)
If IsNull(uName) Then...
I know this is easy and I have done it before, but just can't seem to wrap my head around it again. Writing the query in VBA.
SELECT (tblOwner.oFirst" & " tblOwner.oLast) AS FullName
FROM tblOwner
Error code is:
Syntax error (missing Operator) in query expression '(tblOwner.ofirst...
I am trying to do an update query via vba sql . I have tried setting the variable to Null and to "" and throws an error, I am sure that this is an easy solution, but my brain is fried and tried searching see if anyone has had this issue.
With db
.Execute "UPDATE tblSerialNumber " & _...
I know this is a newbie question but:
When I pass the information from a form to a function in VBA do I have to reformat dates and change the form information that should be numbers to numbers or is this something access will do on its own?
all fields on the form are unbound fields, does the...
I have searched and searched because I was afraid someone would say use the search button on the forum.
I am trying to do a Dlookup on a date to see if there is one or not, it returns 12:00:00 AM when no date is present. here is my code:
adate = Nz(DLookup("[ArrivalDate]", "tblSerialNumber"...
I have search the net and the forum and I can't come up with a solution. Who knows i maybe making this harder than it need be.
What i am trying to do is diplay the data in listbox. I can get it to print in an Immediate window, but not in the list box:
This will call the Function
Private Sub...
I am trying to educate myself on Access and become a better designer. I have yet to find anything in the books I have bought as to which process is better or when to use ADO and when to use SQL Insert. If someone could please shed some light on this subject I would greatly appreciate it.
I have search the site, but obvious I didn't put in the right information.
This is a simple question. I have the following code:
If (Me.CatCode = "Claim already paid/MBR rates no further entitlements/Duplicate Claim.") Or (Me.CatCode = "Same city no entitlements / no per diem authorized in...
I have tried several ways of doing this and can not get it to work. Here is the If statement:
If (Me.ComponentCode = "KM") And (CurrentUser() <> "user1") Or (CurrentUser() <> "user2") Or (CurrentUser() <> "user3") Or (CurrentUser() <> "user4") Then _
MsgBox "You are not authorized to enter this...
One Form or Two seperate ones
I have 2 groups that access a form that looks the same in general. But one group enters more information than the other. I currently have two seperate forms. Would it be good practice to have it all on one form and have the fields/textboxes invisible to one group...
I know this is stupid, but I am losing my mind on it. I want to set the Default value of a combo box using VBA. I have set the values to be listed in combo box with VBA and I am not sure if that is what is causing the problem.
This is what I have:
Me.Order_Type.DefaultValue = "PRC"
Thanks in...
I am trying to do this in VBA, but have been unsuccessful. I don't i may even be doing it wrong. I have search all over the site for an exampl of what I am tryin gto do.
When a user hits btnSave VBA decides whether to run an insert or update sql.
Right now the code stops at the DoCmd.RunSQL...
I have a table that needs to be updated after it is imported. It keeps asking me for a perameter. Here is what I have.
Dim uSDN As String
Dim aStatus As String
aStatus = "A"
uSDN = "UPDATE tblSDN Set tblSDN.Status = aStatus WHERE tblSDN.Status Is Null"
DoCmd.RunSQL uSDN
I went as far as...
I am looking for an undo command that will clear specific fields. This is what i ahve so far:
Private Sub btnClear_Click()
Me.ClaimNo = ""
Me.txtDnDate = ""
Me.txtDNclerk = ""
Me.txtCatCode = ""
Me.txtDnReason = ""
Me.rdDupClaim = 0
End Sub
Problem is that ClaimNo will not clear to null...
I have attempted to create a module, 1st time trying. i have done a lot of searching but i guess the light has turned on as to what I am doing.
I want to check the date to see if it is a weekend and push the date to Monday. So here is the get and set (i used a book to help me along).
Private...