bvanscoy678
04-08-2015, 07:30 PM
Hello,
I am working on a Access database to collect information on potential infectious disease exposures within our fire department. I am sure there are a lot of different ways of doing it, but I was looking at two. Both involve using an unbound form (back and front end) and VBA code.
I was shown one way of collecting the values in an unbound form and then using DoCmd.RunSQL to insert into my tables.
DoCmd.RunSQL "insert into tbl_radio_inventory (Serial_Number,RID,Company,Display,Date_Issued)values([txt_Serial_Number],[txt_RID],[txt_Company],[txt_Display],[txt_date_issued])"
I am also aware of using a recordset to insert the files into the tables.
I have four tables which are all related via the Incident_ID primary key (incident table main). My idea would be to collect the PK from the form and then set the values to each table using the primary key from the incident table, to insert the FK and remaining data.
The DoCmd looks like it works well, but wasn't sure if the recordset had more benefits. The database will be set up on a network server with a front and back end. The use will be light, but I am trying to learn how to deploy a few other Access databases with heavier traffic.
Thanks for any tips, ideas and/or suggestions. I do understand VBA and can get started with a few good bumps in the right direction. I just have never split a database using a unbound form for user input (they will not be viewing any data, just inputting. ).
Thanks,
Brent
I am working on a Access database to collect information on potential infectious disease exposures within our fire department. I am sure there are a lot of different ways of doing it, but I was looking at two. Both involve using an unbound form (back and front end) and VBA code.
I was shown one way of collecting the values in an unbound form and then using DoCmd.RunSQL to insert into my tables.
DoCmd.RunSQL "insert into tbl_radio_inventory (Serial_Number,RID,Company,Display,Date_Issued)values([txt_Serial_Number],[txt_RID],[txt_Company],[txt_Display],[txt_date_issued])"
I am also aware of using a recordset to insert the files into the tables.
I have four tables which are all related via the Incident_ID primary key (incident table main). My idea would be to collect the PK from the form and then set the values to each table using the primary key from the incident table, to insert the FK and remaining data.
The DoCmd looks like it works well, but wasn't sure if the recordset had more benefits. The database will be set up on a network server with a front and back end. The use will be light, but I am trying to learn how to deploy a few other Access databases with heavier traffic.
Thanks for any tips, ideas and/or suggestions. I do understand VBA and can get started with a few good bumps in the right direction. I just have never split a database using a unbound form for user input (they will not be viewing any data, just inputting. ).
Thanks,
Brent