(using DAO by the way)
Private Sub Form_Load()
standrews = "E:\Chris\College\Computing\standrews.mdb"
Set Workspace = DBEngine.Workspaces(0)
Set Database = Workspace.OpenDatabase(standrews)
End Sub
Sub subAdd()
Set Recordset = Database.OpenRecordset("SELECT * FROM...
Thanks, I tried the line "Database.Execute strAdd", but an error message came up saying it had too few parameters and that it had expected 4...
However I have solved this problem through a different method now, thanks for your help
Is there a way I can open an Access database and close my VB application on the click of a button?
Just in case this creates any confusion I do not mean reading data from the database in VB, I mean physically open Access and the specific database and close my VB application
Thanks
(with VB5)
I am trying to make an application that can add, edit and delete data to, in and from a database, but I am having problems with the my adding and editing subroutines
here is my adding code:
Sub subAdd()
strWhere = ""
strSubject = "SELECT Subject.SubjectID...
Okay, well I have implemented the
"If not ISNULL(Me!Combo17.Value) then"
line, but whenever I try the code now it brings up the error message:
"Compile error
Variable not defined"
I have 3 comboboxes and intend to have code that when a button (cmdSearch) is clicked will read the data from the comboboxes and dynamically create a query, here is my function:
Private Function fncGenerateQuery() As Boolean
Dim strSQL As String
Dim qdfTemp As QueryDef
Dim strWhere As String...
Okay, this is now working thanks but I have a couple more questions;
I am using 3 comboboxes on the form to use in the query now, how can I use wildcards in these? I was thinking of using If statements to direct the program to a suitable query, but this seemed too long winded. How can I get the...
I am trying to set up a form with 2 comboboxes and a textbox, plus a query to use the data from these boxes to search the database.
I have tried the following SQL statement for my query:
SELECT Teacher.TeacherID, Teacher.TeacherName
FROM Teacher
WHERE (((Teacher.[TeacherName...
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.