Thats what I thought, but the list isn't updating.
This what I was using but as I say I was expecting the list to update as soon as I finished but it only updates when I select an item in the list box!
Private Sub ChristianName_BeforeUpdate(Cancel As Integer)
Me.List127.Requery
End Sub
My code is throwing an error on the DoCmd. I copied it from an old database that I built but Im now using Access 2016. Haven't done access for a while so Im out of touch. Has it changed?
DoCmd.DoMenuItem acFormBar, acrecordmenu, 5, , acMenuVer70
Me.List127.Requery
Just saw it, thank you, the top line seems to do what I need, I will take the time to dissect it and try to understand it. Many thanks for your patience.
But the first word, in this case is 'Drugs' other first words could be longer/shorter, so how do I extract the bit that I want, in this case the word 'test'?
Dont know how to bring up the immediate window, sorry.
Well Idid this:
Instr(1, [Odour], "(")
And it produced the number 7, I'm assuming that means either the amount of characters or the amount of spaces!
But I dont know what the number '1' means in the Instr statement!
I have created another query with just a single expression in it
Expr2: Mid([Odour],InStr("("+1,[Odour],")")-1)
It produces the word #Error when I run it!
If you mean
Left([Odour],InStr(1,[Odour],"(")-1)
then yes that bit worked.
The original field was called 'Odour' and it held 'Drugs (Test)' when I ran the query I got 'Drugs (Test)' in the first column and 'Drugs' in the next. In the 3rd column I got #Error. I was hoping to get 'Test'.
OK got the left working but when I do Mid that produces the word "Error" when I run the query.
This was what I used for Left
Left([Odour],InStr(1,[Odour],"(")-1)
And for Mid
Mid([Odour],InStr("("+1,[Odour],")")-1)
Well Iv'e been bashing around with this for best part of an hour and a half, not really sure what Im doing!
Where should I be writing this, I've been trying to put it as an expression in the Append Query but I'm not sure that's the right place!
It will be appended into a table [tbl_Odour] Fields are [txt_OdourType] (this is where this bit Cadaver ( goes. Next Field is [txt_Odour] this where this bit Blood goes. Next field is [txt_Bracket] this is where this bit ) goes. Finally [txt_FullName] this holds the concatenated name Cadaver...
Hi I need to de-Concatanate a field, there are some common things in it the field but I don't know how to go about it. The field would contain something like
Cadaver (Blood) or Explosives (RDX TNT)
I need to break it down into something like:
Cadaver (
Blood
)
or
Explosives (
RDX TNT...
Just tested it and its not actually writing to the table. I tested it by putting in some new data into a spreadsheet and then importing the table and running the append query
Yes but it is made up of four fields [txt_Odour], [txt_OdourType], [txt_Brackets] and [txt_FullName].
txt_FullName is a concatenated field made up of the other three fields. I have just changed the query but now Im getting the same error but on the field txt_Odour
Query is:
INSERT INTO...