I am looking for some guidance. I wrote a SQL statement that returns only one result every time for a table. I need to get the data from that result into a string so I can modify it before I put it into another table. What should my next step be or should I use a recordset?
CODE:
<code>...
Is there a way I can programmatically check for an object?
My dilemma is, I want to see if a table exists before I give the command to delete it. If I DoCmd.DeleteObject and the table isn't there then I get an error.
Thanks for the help.
I'm sorry if someone has already answered this question, but it's starting to get late and my brain is fried from searching.
I am looking for some guidance no how to pass VBA code into either a pre-existing query or create a new query for that instance. I have toyed with the ADODB.Recordset a...
I was wondering if there was a way to get a number of results in a query.
I am running a query by form and I want to know when it returns 0, or for that matter any number of results. Just wanted to know if there was a easy way to request this.
Thanks in advance.
Is there something wrong with my code?
I keep getting the wrong value on this function. I get the value that comes next on my list.
=DLookUp("DepartmentName","tbl(dropdown)Departments","DepartmentNumber =" & "'" & [DepartmentNumber] & "'")
I also tried...
Here is the situation....
I have a report that gets data from a query from one table. In the report it displays:
Date, Item Description, Department Name and Price.
The report is divided by department and in the footer I have the Price totaled for each.
In another table I have the projected...
Is there a way to get the value of a cell on a specific row by looking up or querying another value on the same row?
Example:
Barcode is a field/column; Serial Number is a field/column.
::::You enter or scan the barcode and the value from the Serial Number field appears in an unbound txtbox.
Can someone tell me why my code doesn't work? There are no errors (other then it not working). Please Help!
Private Sub RequisitionPrice_BeforeUpdate(Cancel As Integer)
If Me.RequisitionPrice = "$0.00" Then
'Message box warning
MsgBox "Warning " _
&...
The title explains it all.
I don't know how to do this. This is my code for the send-email cmd but it only sends the xls file.
DoCmd.SendObject acReport, stDocName, acFormatSNP & acFormatXLS, tonames, ccnames, bccnames, stSubject & Date, stMessage, no
Just a quick thought......
Is it possible to access my Outlook Address Book from a form in Access?
I am going to send a monthly report and I have a form that lists the address of the recipients, but I would like to have an option to select other people from my address book.
Any ideas......Thanks!
Just a quick question that I couldn't Google; (evidently there is something called VBA Infinity, lol)
I am setting perimeters for a query and I would like to know how to set a -Infinity and +Infinity to a price.
Please help...thanks
Me!txtLowerPrice = -Infinity
Me!txtUpperPrice = Infinity
I have a text_box in a form that will fill a query criteria but when it's blank I want it to insert the following (see below) but I cant seem to get it to work.
Can anyone tell me what I am doing wrong?
If Me.txtStartDate = "" Then
Me.txtStartDate = "1/1/" & Year(Now)
End If...
I am trying to have a check_box enable one or more of my Txt_boxes. I have place the below code in the before_update event. Could anyone help me out and let me know what I did wrong with this. Thanks ;)
If Nz(Me.Check28, True) = True Then
Me.txtStartDate = Enabled
Me.txtEndDate =...
I get results but not the kind I want.
I have a form with a checkbox in it. If the box is checked, I want to go to another form; if not, I want the code to continue. I naturally used a If Then Else loop, but I must have overlooked something. Please Help. Thanks in advance.
Private Sub...
I have a form that is getting data from another open form. I have set the default value of the second form's textbox to the textbox of the first. That appears to be working the way I want. Although in one textbox I am trying to add an * (the actual character) to the beginning and the end of...
I have a IIF statement (seen below) that will request input but still run the query if no input is received. I would like to incorporate this into a "between...and..." for a date range and also a price range. I have tried quite a few combinations but cant seem to get it right.
Any suggestions...
.....LOL. I am trying to find some VB code to actually delete one of my tables after I'm done using it.
I use the table as sort of a buffer to get data from two tables that are very different. After I run a query and print a report based on that table, I want the DB to delete that table.
So...
This should be an easy one, but I looked and couldn't seem to find the answer.
How do I make a form start on a black entry page? When I open my current form it begins at the first entry.
I am trying to create an optional field that only becomes available under certain circumstances.
I have a combo box that has many options in it, and the field is restricted to list/look-up only. When the selection isn’t on the list, I would like the use to pick “other”; then in another 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.