drrocket5292
Technical User
hi,
I have a form that has several controls bound to a query. I added a new table named address to my database and then I added a couple of textboxes to my form today so that the user could type in the customers address and via a query it would fill into the new address table. the address table is linked to the other tables with a foreign key, so I updated the underlying query that is the recordsource of my form and I added all of the fields of the new address table with a left join statement to it so that I could bound their controls on the form. Now I have all of the controls bounded on the form to the query but now when I open the form, it goes to the first record of the query instead of being blank for data entry like it used to be. I dont know what I did and I dont know how to switch it back to where the controls of the form are blank when i open it so that I can enter data in it and have it go into a new record in the query. I tried putting in code when the form opens that says:
docmd.gotorecord , , acnewrec
but when I put that code in, my form wont open at all. Does anyone know what I did to make it start displaying the first record of the query and does anyone know how I can change that so that it becomes a data entry form again? it's data entry property is already set to yes.
I have a form that has several controls bound to a query. I added a new table named address to my database and then I added a couple of textboxes to my form today so that the user could type in the customers address and via a query it would fill into the new address table. the address table is linked to the other tables with a foreign key, so I updated the underlying query that is the recordsource of my form and I added all of the fields of the new address table with a left join statement to it so that I could bound their controls on the form. Now I have all of the controls bounded on the form to the query but now when I open the form, it goes to the first record of the query instead of being blank for data entry like it used to be. I dont know what I did and I dont know how to switch it back to where the controls of the form are blank when i open it so that I can enter data in it and have it go into a new record in the query. I tried putting in code when the form opens that says:
docmd.gotorecord , , acnewrec
but when I put that code in, my form wont open at all. Does anyone know what I did to make it start displaying the first record of the query and does anyone know how I can change that so that it becomes a data entry form again? it's data entry property is already set to yes.