Index With Tab Control + Weird Problem With Tabs' Captions
Mar 24, 2006
I' ve created an index (catalog) for the books in the database using a tab control and the code:
Private Sub TabCtl21_Change()
If (193 + Me!TabCtl21.Value) < 210 Then
Me.RecordSource = "SELECT * FROM tblBookTrackDetails" _
& " WHERE [tblBookTrackDetails.Details] Like '" & Chr(193 + Me!TabCtl21.Value) & "*'" _
& " ORDER BY " & Me.SortingTypeList & " ASC;"
End If
'for english characters chr=97
If (193 + Me!TabCtl21.Value) >= 210 Then
Me.RecordSource = "SELECT * FROM tblBookTrackDetails" _
& " WHERE [tblBookTrackDetails.Details] Like '" & Chr(194 + Me!TabCtl21.Value) & "*'" _
& " ORDER BY " & Me.SortingTypeList & " ASC;"
End If
If Me.Recordset.EOF Then
MsgBox ("There are no books for this letter!")
End If
End Sub
It works ok but please take a look at the attached image to see what is happening after clicking two or three times the index letters.
After the tab's caption is "erased", if I pass over the mouse is being corrected.
I tried the repaint and refresh commands but neither worked.
Can anyone help?
I'm using the Microsoft Calendar Control 11 to populate a date field on a form. The date field has a format of "Medium". When I use the control, I select todays date and what gets populated is 30/12/1899. But...if I immediately go back to the Calendar control and select todays date, then the proper value gets added.
This happens for every NEW record I create. What is happening??
I have on one of my forms a tab control with 5 different tabs on it. Each of the tabs has a different set of fields but all from the same table. I was wondering if it is possible to hide a tab if none of the fields on it have any data in?
So for example tabs 2 and 3 have data on them but tabs 1, 4, and 5 dont. I would want to hide tabs 1, 4 and 5.
I have a tab control form with about 5 tabs. However when I move to the tab that has a datasheet form, the page moves down. You have to scroll up to see the above tabs. Is there something I'm missing on this simple tasks? Is it better to have it as a basic form for easier interface.
I have created a new form with a few tabs, I need to let the value's of the last record be carry to a new record, but it must only show when I press the first letter on the new record, I did rerad about this, but only find it for normal forms. Did try to get it to work, but it dows not work on tabs form
I'm trying to clean up a form a bit and have it only show certain subforms/graphs if the data exists. I already have columns in a combobox query to show an "X" for if certain data appears:
Now, I know I could build another query and have some system go through and identify these things, but the easiest thing would be to reference the "X" in the columns of the combobox. Is there an easy way to reference values in the other (non-primary) columns? Or can you think of an easy way to make these subforms only be visible when the data exists? Maybe have an on load event for the subform?
I'm trying to make a very simple click through data entry screen in Access 2007. For each record I want to have a standard form with three buttons at the bottom. Each button opens a new form (each form has a set of tabbed pages on it as there is lots to enter).How do I make sure that each of the additional forms populate the same record as the main form.
I have an MS SQL 2000 backend, and I link the tables from here to an .mdb file. In that .mdb I would like to change the field captions of the tables in runtime, but when I try to assign value to a caption property which didn't have value before, I receive an error message which says, that this property could not be found. I tried out a lot of things, but up to now, without any success. Does anybody have any idea, what could be the solution? I would be very grateful for any small tips!
I want to change the Caption of a textfield depending upon a value selected from a combo box. i.e. If the user selects 'Scientist' from combo box, then the caption to enter name should be 'Scientist Name' if the user selects 'Engineer' then caption should be 'Engineer Name'. Can anyone guide me how this can be done? Thanks
I am wandering if anyone has a solution to this problem i has basically have 2 tables 1 called departments, with the fields: Dep No, Dep Name, then i have another table called Items, with the fields: Item No. Item Name, Item Price, Department.
What i want to do is create say 10 command buttons and create an array of them i know sort of how to do it in visual basic and all the 10 command buttons name is the same and an aray is created but i dont know how to do it in access i know that it doesnt let you create an array but i have seen it done somehow in a project that i came across.
so basically what i would want to have done is on the form load the 10 department buttons captions are loaded from the table departments and when a department button is clicked its is linked to items where i ahve created say 20 command buttons called items.
I dont know it it makes sense what i have written but any help on this matter would be very apreciated it pr if anyone knows of any examples as i have been stuck on it a while
Hi. I regularly import tables with many fields from a third party application into Access 2000. These fields all have captions as well as field names (obviously!) but I give them much more meaningful "friendly" names. But to do this I must first manually delete all the captions. Is there an easier way? Thanks in advance.
I have this command button whose caption switches from update record to save record with a msgbox verifying if the person really wants to take this action. On click the user is then allowed to update the record then in theory they would be able to hit the same button whose caption now reads save record, the msg box would appear with a yes or no answer required. The code I have is putting the msg box after the user clicks the update button.
Anyhelp and/or suggestions would be most appreciated!
Private Sub cmdOpen3_Click()
stDocName = "frmSearch"
If cmdOpen3.Caption = "&Update Record" Then If IsNull(Me.FTMSubform.SourceObject) = False Then Me.FTMSubform.SourceObject = "frmFTMInfo"
If cmdOpen3.Caption = "&Save Record" Then If IsNull(Me.FTMSubform.SourceObject) = False Then Me.FTMSubform.SourceObject = "frmFTMInfo" If MsgBox("Save update to this individual?", vbQuestion + vbYesNo, "Save Update?") = vbYes Then DoCmd.Save DoCmd.Close acForm, "frmFTM" DoCmd.OpenForm stDocName Else MsgBox "Return to the FTMInfo Form!", vbInformation, "Save Function Aborted!" End If End If End If End Sub
I would like to display a continuous form with a command button whose caption is dynamic; such that the button text is determined by a field in the underlying recordset of the table.
So, if the field were forename : each button caption maybe : Brian, Peter, Sally etc.
I used the code below to check the empty fields in the form and populate it in a message
Code: Private Sub Form_BeforeUpdate(Cancel As Integer) Dim ctr As Control Dim strMsg As String 'Loop through every control on the form For Each ctr In Me.Controls
[code].....
I want the message to show the captions of controls instead of its names
I have a system that has a growing number of forms. On each form they are a variable number of labels/text boxes/command buttons etc. The captions for all of these are in english.
The database is to be deployed to a non english speaking country so I want to be able to dynamically change all the captions on the forms (not n the data) to the local language.I know how to do this. For each control on load I decide the local language and change the caption accordingly ie (and code is for illustration only and not necessarily syntactically correct)
if locallanguage = 1 me.control1.caption = "save in english" me.control2.caption = "heading1 in english" else me.control1.caption = "save in local language" me.control2.caption = "heading1 in local language" end if
What I want to know is there and easy way to do this. Rather than wade through each control on each form and find out what the name is can I generate anything that will give me all the control names and captions for each form (and report)?
I want the caption for buttons in my Form to be pulled from a record in a table. Additionally, I want the name of the related form or report opened from the button to be pulled from the same record. I've been looking into this and it seems like using DAO is one option,I've already go the table set up, that was easy enough.
So I'm using the same field in a query, price. But I need it listed twice in the table it creates, one as cogs_mfn, and the other as cogs_afn. The problem is that since the field that the data is coming from is exactly the same, the caption remains consistent, whether one or the other. I've tried to create separate expressions, but that doesn't work either.
I have a form (Form1) and a in it, I have 2 subforms datasheet (Subform1 and Subform2). I have ID, First Name, Last Name in each as headers.
I need to:
1) Find the subforms 2) Loop through the subforms and get all the labels 3) Change the captions
The reason for this is because I need to have the forms bilingual. I do have a function that will translate the caption (called TranslateThisWord). I just cant figure out a way to loop through the subforms and find all the labels.
My database has a front end that uses forms to allow the user to navigate within it, each year we create a new database which is based on the previous year's database but with all the variable information removed.
Within the database each form has a caption that starts with '2014-15' then goes on to say the form name.
Most of my forms also have a yellow background, (last year it was pink).
Both these areas were set up so that each year our users can distinguish between our databases, as they may have last years and this years open at the same time.
What I would like if possible is to know whether I can get a user to change both these things from within a form. So something along the lines of a button that when clicked would check all form captions and if within the caption it finds 2014-15 then change it to 2015-16 (or whatever the user specifies) but keep the rest of the caption. I would also want the same type of thing to happen with the colour so again within the background of the forms, if you find colour X then replace it with colour Y.
If this can't be done within a front end form, then could it be done behind the scenes, and if so how would I go about doing it?
I have many queries in a DB. they work fine, but *sometimes* some of my queries are wiped - when i try to run them they say "query must contain at least one cell" or something..
when i check the query then, its empty!
I have saved out the SQL code into a word doc because this has happened a few times now.. so i just copy and paste the query back in - but this is very inconvenient! what is going on?