Ok, I'm completely lost. I can't figure out the best way to go about this, and I am not very familiar with Access 2007 (VBA and Forms anyways) I do have a good working knowledge of SQL. I have a bunch of questions so maybe I'll just index them cause they might be pretty random.
1.) Whats the best way to use a 'BLANK' form for inserting multiple records?
--The way I have tried is first binding the form to the table I want to add a record to, but I have to add several records with one form interface and I don't think that this method will work. I have tried to instead not bind it at all and use drop downs and cascading drop downs to get the values, then I would Ideally want to use a button and on its click event run some SQL code. I think this would be the easiest, but all attemps have failed. Here is a sample of what I have tried:
First make a button, then click its properties and in events table, under On Click use the code builder to do this:
Obviously it doesn't work.
2.) What is the code builder exactly? Is it visual basic code.. is this the same as what you would write in visual studio?
3.) Do I have to open the database or something before I can run SQL, I've seen examples with
And then some open command.. err I'm lost. I have used C++,C,Java but I never used VBA if thats what this is.
1.) Whats the best way to use a 'BLANK' form for inserting multiple records?
--The way I have tried is first binding the form to the table I want to add a record to, but I have to add several records with one form interface and I don't think that this method will work. I have tried to instead not bind it at all and use drop downs and cascading drop downs to get the values, then I would Ideally want to use a button and on its click event run some SQL code. I think this would be the easiest, but all attemps have failed. Here is a sample of what I have tried:
First make a button, then click its properties and in events table, under On Click use the code builder to do this:
Code:
Private Sub EnterRecordButton_Click()
INSERT INTO PREquipment(EquipmentName,PREquipmentTypeID) SELECT [Forms]![AddEquipment]![Add_EquipmentName],2"
End Sub
Obviously it doesn't work.
2.) What is the code builder exactly? Is it visual basic code.. is this the same as what you would write in visual studio?
3.) Do I have to open the database or something before I can run SQL, I've seen examples with
Code:
Dim dbs AS Database
And then some open command.. err I'm lost. I have used C++,C,Java but I never used VBA if thats what this is.