Thanks for your help on this - i am trying to test it but i keep getting 'Compile error - userdefined type not defined' for the line Dim dbs As Database
What does this mean ??
I will search the forum and post back if i have figured it out !!
Cheers
I have changed the date anyway - just incase.
i have a snippet of the code below. as you will see i am trying to use the variable 'entrydate' as the data to enter into the table ( i would then add 1 to the entrydate each time to make the entries for all those dates )
I keep getting 'Enter...
thanks for that. This 'date' is actually referencing the 'date' field in my table - should i therefore rename that field do you think ?
Thanks for your help.
Apologies..
is it a query issue with they syntax or is it a form issue with the syntax ?
I wasn't sure - so i posted to both so as a specialist in queries could deal with it, or a forms person could deal with it.
Sorry again.
Hi,
I am trying to insert a set of data which is entered from an unbound form into a table.
I want to enter a From: date and a To: date and the by calculating the difference in days between the 2 dates, loop through an insert statement to enter the same data, but just adding 1 day to the date...
Hi,
I am trying to insert a set of data which is entered from an unbound form into a table.
I want to enter a From: date and a To: date and the by calculating the difference in days between the 2 dates, loop through an insert statement to enter the same data, but just adding 1 day to the date...
Thanks very much for your help on this....it worked.
I am trying to do the same for a hotels section and have the following
ss = "INSERT INTO [hotels] (hotelid,hotelname,hotelsresortid,date,hb,al,sc,bb) VALUES...
Thanks for your efforts - i had just looked at the same thing myself !!
Much appreciated though -itt's so annoying that it's so simple, yet you don't know where to start looking !!
many thanks again !
Phil.
Forget it - found the solution...it was a syntax problem
ss = "INSERT INTO resorts " & "(resortname,transfercost) VALUES " & "(txt_resort_name, txt_trans_cost);"
Hi,
sorry if this is really basic to you all, but i am stuck and have searched and searched but to no avail. ( it would probably help if i knew exactly what to search for ! )
What i am doing is adding data to a table when a button is pushed ( code bound to button )
i have 2 unbound text boxes -...
Hi,
I am running an SQL statement in VBA so that when a button is pressed, it takes the values from 2 text fields and puts them in a table in the correct fields.
I can do this fine with 1 statement
ss = "INSERT INTO [resorts](resortname) VALUES (txt_resort_name)"
but this only inserts into the...
no.
basically i have a combo box which selects countries and from changing the combo box it changes the subform listing resorts within the country.
What i want to do is add a simple way of adding another country to the table and therefore the combobox.
The when i have added it, i can refersh...
Hi,
I am trying to add data to a table from a text box..i.e. enter the name into the text box and click the 'add' button - this adds the data to the table.
It has to be an unbound text box, so it has to take the value of the textbox ( NewCountry ) and add it into the countryname field of the...
You've probably solved this by now, but surely the best way of stopping someone deleteing the autonumber is to lock the field, so nobody can change it.
I'm sure what was previously said about not using autonumbers as invoice numbers is also correct, but surely this is an easier way of dealing...
Hi, brain meltdown so help would be really appreciated !!
I have a form with a single combo box on it which selects different countries.
This form ( frm_countries ) has a subform which displays the data of all the resorts within that country. ( countryid, resortscountryid are linked )
fine and...
Hi, brain meltdown so help would be really appreciated !!
I have a form with a single combo box on it which selects different countries.
This form ( frm_countries ) has a subform which displays the data of all the resorts within that country. ( countryid, resortscountryid are linked )
fine and...
I have a table with costprice, maxsellprice and minsellprice fields.
On the form, i want to be able to enter the costprice. The i would like the maxsellprice to be autofilled with 2.5 x cost price and the minsellprice to be filled with 1.5 x costprice.
I would normally just have the latter 2...