How do I tell SAS not to print the value of a numeric variable if it is zero?
I have a variable called SEGNUM which I initialize to zero at the beginning of my code. Then I have statements that set the value of this variable depending upon certain conditions, so there are times it will remain...
I have created a simple telephone message form in Outlook 2000 and saved it to my Personal Forms Library but now we want everyone to be able to use it. What is the easiest way to do this?
I thought of just sending everyone a copy to save in their drafts folder, but then each time they fill it...
Oops! I should have picked up on that. Thanks. However, the problem is that this snippet of code:
strName = txtGroup.Text
If strName <> "" Then
Set rs = GetArtist(strName, strField)
If Not rs.EOF Then
With rs
.MoveFirst
If...
I have some code on the change event of my textboxes, but I only want it to fire if the user does NOT hit either the delete or enter key. I tried moving my code to the KeyPress event and prefacing it with:
if KeyAscii <> 8 or KeyAscii <> 127 then
'my code here
end if
However, then my code no...
I am using the following code to automatically retrieve matching information from a database and populate a text box as the user types each letter.
lngOrigPos = txtLName.SelStart
Set rs = GetArtist(strName, strField)
If Not rs.EOF Then
With rs
.MoveFirst...
I want the user of my program to be able to select which field they want to group by and then pass that value to Crystal reports, but I can't figure out how to do that.
Do I use GroupSelectionFormula, GroupCondition, or GroupSortFields?
I have created my report with a group section, but...
Additional Information: when I debug, the error that comes up at crReport.Action = 1 after the cannot connect error is:
.Action=<property is write only>
Help!!! This is driving me crazy!
Thanks
I am using VB6, CR 4.6 and Access 2000 and I think there is a discrepancy in my database connection.
My global variable in my vb project is:
Set myConn = New ADODB.Connection
strDataSource = App.Path & "\InventoryV1.mdb"
With myConn...
I am working with VB6, CR 4.6 and an Access Database. I have a customer table with the fields:
LastName
FirstName
CompanyName
There will never be both a LastName and CompanyName entered, so when I pull up my customer report I want to have one field on the report called customer and fill it...
That doesn't really work, because if the database returns a record the cursor goes to the end of the text. Here is what I am attempting to do:
-User types the first letter of the name in the textbox
-change event fires and queries the database using the like operator to find all names that...
The following snippet of code works fine, except after execution the cursor positions at the beginning of the textbox instead of where the user left off. What I want is for the user to be able to keep entering the name in case the name that the database finds isn't the one they want.
Private...
OK - this is getting really frustrating. The code that was working yesterday (if rCell.locked = false then rCell.locked = true) today is not and I didn't change anything! Now I am getting a message that says "unable to set the Locked property of the Range class." I tried leaving out...
Thanks Geoff. I tried that first but couldn't get it to work. Maybe I was putting the code in the wrong place? I had placed it in the Worksheet Activate event, is there a better place?
Annette
Thanks. I was actually using:
Cells(MyRow, 1).Copy Sheets("Pay Slip").Range("G1")
to copy data from one worksheet to another.
So, I added a loop at the end of my sub as follows:
For Each rCell In Selection
If rCell.Locked = False Then
rCell.Locked = True
End...
I want to stop a user from entering information on a worksheet that is being updated through VBA code. I am using ActiveSheet.Unprotect, updating the cells, then using ActiveSheet.Protect at the end of the sub. The problem is that when the sheet is unprotected, the updated cells are somehow...
I am copying cells from one worksheet to another. If I hard code in a cell address it works fine. But I want to copy only certain cells from a row that the user selects. How do I assign the row ID to a variable.
Here is the code that I have so far:
Private Sub cmdPaySlip_Click()...
Thanks Rob. Now I have another problem. Here is my code:
Private Sub cmdPaySlip_Click()
Dim myRow as String (????)'is this the right datatype?
If Selection.Rows.Count = 1 And Selection.Columns.Count = 256 Then
myRow = Selection.?????
Range(myRow,4).Select...
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.