Question. I have a Table that includes 7 columns for the days of the week. The table data is pulled from a report where it just shows a "Y" in that days column if the course (I work at a school) is taking place on that day. Is there a way to have it change to the letter of the day instead. For instance, if a course is taking place on Mondays, I would like to have an M show instead of a Y when I run that query. I have built separate tables for each day to look for a Y and replace it with a letter but that's 7 different tables that I have to connect every time and I know there has to be an easier way. Any help would be awesome.
It sounds like you have 7 columns where the field names are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday. Courses are in rows. If a course happens on that day, it has "Y" in the field, but you want to show the first character of the day instead. You can solve this using the function called iif() You can use iif for each column in your query. Your query design might have an expression: CourseMonday: iif([Monday]="Y", "M", "") then, CourseTuesday: iif([Tuesday]="Y", "T", "") etc. One query only 🛠 How to use iif: ruclips.net/video/tGfebrGlnHY/видео.html
Hi, really great videos! I was wondering if you might do one in the future on the SelStart property to move the cursor to a particular spot in a text box string and then add new (or replace text) at that location?
had an issue, if use replace with group and contion succh as like eg reason for visit *well care*, *well visit,* wcv * were strings to find in text however wanted to replace ‘swell’ to ‘’nothing because I don’t want to match on swell, or swelling in query design replace(x, “swell”, “”) group critreria : like *well care*
You don't need the Replace function here I think (unless you're changing data). If you don't want to also capture swell or swelling then you can search Select * From MyTable Where TextField Like "well %" Or TextField Like "% well %" The first condition will find those with entries starting with "well". The second condition will find entries with " well " as a whole word in the entry. No swell or swelling. Note the spaces! Replace % with * if you need to. YT wants to format this comment using stars :-D
Question. I have a Table that includes 7 columns for the days of the week. The table data is pulled from a report where it just shows a "Y" in that days column if the course (I work at a school) is taking place on that day. Is there a way to have it change to the letter of the day instead. For instance, if a course is taking place on Mondays, I would like to have an M show instead of a Y when I run that query. I have built separate tables for each day to look for a Y and replace it with a letter but that's 7 different tables that I have to connect every time and I know there has to be an easier way. Any help would be awesome.
It sounds like you have 7 columns where the field names are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday. Courses are in rows. If a course happens on that day, it has "Y" in the field, but you want to show the first character of the day instead.
You can solve this using the function called iif()
You can use iif for each column in your query. Your query design might have an expression:
CourseMonday: iif([Monday]="Y", "M", "")
then,
CourseTuesday: iif([Tuesday]="Y", "T", "")
etc.
One query only 🛠
How to use iif: ruclips.net/video/tGfebrGlnHY/видео.html
wow wonderful information
Thanks! Glad it works for you. cheers
Hi, really great videos! I was wondering if you might do one in the future on the SelStart property to move the cursor to a particular spot in a text box string and then add new (or replace text) at that location?
Great suggestion! I'll add that to my upcoming topics. Thanks!
Here you go: ruclips.net/video/q_tkXgsIjv4/видео.html
had an issue, if use replace with group and contion succh as like
eg reason for visit *well care*, *well visit,* wcv * were strings to find in text
however wanted to replace ‘swell’ to ‘’nothing because I don’t want to match on swell, or swelling
in query design
replace(x, “swell”, “”)
group
critreria : like *well care*
You don't need the Replace function here I think (unless you're changing data). If you don't want to also capture swell or swelling then you can search Select * From MyTable Where TextField Like "well %" Or TextField Like "% well %"
The first condition will find those with entries starting with "well". The second condition will find entries with " well " as a whole word in the entry. No swell or swelling. Note the spaces! Replace % with * if you need to. YT wants to format this comment using stars :-D
thanks
Welcome
Would have preferred to see the VBA code so I can turn this into a function
It is a native function in VBA, so you are good to go.
How to insert automatic text from drop-down when I edit or modified or update in any row
You could do this using After Update and After Insert on your Form. Put some VBA in there to insert the text.
Sir can you provide me VBA code please
great
Thanks!
How to control duplicate data in two fields in ms access form
Good question! You can check those using VBA and the After Update event. Just check to see that they are not the same.
But how sir
You could use an If Then statement. ie.
If Me!txtA = Me!txtB Then
MsgBox "Please don't put in duplicate info"
End If
Something like that.
You can also use ruclips.net/video/JFYH7mmoR_s/видео.html