Hi, I am looking at a list of options using a "Select Case" function in VBA, and based on the result, want to put data in a certain row on the spreadsheet. I could put
Case 1
Range("h3").Value = txtDate.Text
Range("i3").Value = txtTime.Text
Case 2
Range("h4").Value = txtDate.Text...
How do I use an "If" to either copy the contents of a cell into another cell, OR leave the destination cell untouched, depending on a certain logical test. I see the syntax of the "If" fnction is "If(logical test, value if true, value if false)", but what if I don't want a 'value if false'? If...
I have been sent an employee listing as an Excel file. The first column is in the form of:
Jones, Peter A
Smith, Richard Alan
Johnson, Bert
etc etc...... I want to split this into three columns. Last name, First name, middle name or initial (Which will sometimes be a name, sometimes an...
Hello, this is kind of a follow on to my previous thread about moving a project in development onto my laptop.
After ensuring that the Microsoft DAO 3.6 Object Library is properly referenced, I no longer get the "ActiveX component cannot create object" error - this was a critical error that...
Hi there. I have a VB5 database application that I've been working on for a while on my desktop, and it has been coming along ok. When I run it (uncompiled) it runs as expected.
I have now installed VB 5.0 on my laptop to work on it on the road. However, when I try to run it now, it crashes as...
How can I set the width of individual coulmns at runtime? It seems to me that the line
dgRecords.Columns(1).Width = 2000
Should set the width of the second column to 2000 pixels, but it has no effect at all. I have DefColWidth set to 0 in the design time properties window.
As a follow up...
Hi everyone.... This is more of an Excell question, really, but I hope someone can help.
I am ready to populate the database for an application I have written. My HR dept have sent me the data they currently have in the form of an Excell spreadsheet. Each row of the spreadsheet has an employee...
Hello again, everyone. Can someone please tell me what I'm doing wrong again?
In my app, the user can put in part of the name of a training class to see records. If the database doesn't find a match, or only matches one class to the search criteria, fine, but if it matches more than one, I want...
Good morning. When my applications main page opens, there is only one line in the "Form_Load" sub - it reads "frmLogin.Show". It is supposed to open the mini form that alows the user to enter his username and password. The problem is that frmLogin opens BEHIND frmMain, and I can't figure out...
Hi, I'm getting a "data type mismatch" error when trying to use a variable in the "WHERE" clause of a SQL "SELECT".
The code line that fails is :-
("SELECT * FROM Employees WHERE EmployeeNo = '" & empno & "'")
empno is a variable declared by "Dim empno As Integer", and the field "EmployeeNo"...
Thanks for the help on my previous question, everyone.... now I have another problem. I dumped the bound data fields as advised, and am entering new records using SQL. I can't, however, get it to insert a date.
This...
db.Execute "INSERT INTO Records (EmployeeNo, Training) VALUES ('" &...
Hello, I want to look up a name in adatabase. I've got it working, as long as the user enters the name just as it appears - ie entering "Smith" will return hits for "Smith", but not for "smith" or "SMITH". How do I allow this to find matching entries without regard to case?
Richard
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.