Button Captions And Details From Table
Sep 18, 2007
Hi There
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
Many Thanks
View Replies
ADVERTISEMENT
Nov 13, 2011
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.
View 7 Replies
View Related
Jan 10, 2006
Hi everyone, I am new to this so bear with me.
I currently have a form with textboxes and 2 combo boxes. I have a submit button at the bottom of the page and would like this to take all the infomation from the form and add to a master table.
I was hoping to be able to create a pop up message to say "This item has been added to the database"
Can anyone help point me in the right direction?
Many Thanks!
View 1 Replies
View Related
Jan 10, 2006
Hi everyone, I am new to this so bear with me.
I currently have a form with textboxes and 2 combo boxes. I have a submit button at the bottom of the page and would like this to take all the infomation from the form and add to a master table.
I was hoping to be able to create a pop up message to say "This item has been added to the database"
Can anyone help point me in the right direction?
Many Thanks!
View 6 Replies
View Related
Aug 9, 2005
Hi all!
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"
Me.FTMSubform.Form!txtFirstName.Enabled = True
Me.FTMSubform.Form!txtFirstName.Locked = False
Me.FTMSubform.Form!txtFirstName.BackStyle = 1
Me.cmdOpen3.Enabled = True
Me.cmdOpen3.Caption = "&Save Record"
Me.cmdOpen4.Enabled = False
Me.cmdOpen4.Caption = "&Update Record"
Else
Me.FTMSubform.Form!txtFirstName.Enabled = False
Me.FTMSubform.Form!txtFirstName.Locked = True
Me.FTMSubform.Form!txtFirstName.BackStyle = 0
Me.cmdOpen3.Enabled = False
Me.cmdOpen3.Caption = "&Save Record"
Me.cmdOpen4.Enabled = True
Me.cmdOpen4.Caption = "&Update Record"
End If
End If
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
~Van
View 2 Replies
View Related
Oct 28, 2005
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.
Is this possible / and how can it be done?
Thank you.
G
View 8 Replies
View Related
Apr 12, 2005
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.
View 1 Replies
View Related
May 5, 2013
I have a table TO-det and another table DO-DET.The table DO-det will have details about all DO for each TOID record.Both have a common field name TOID The tables are related under ONE-MANY relationship.One TO-DET record can have many DO-DET record
Now I wanted to create a form where if i add a new record to TOID i must also be able to add data for DO-DET for that corresponding TOID.
View 1 Replies
View Related
Apr 15, 2008
Hi,
I have not used Access for over 10 years! I am using Access 2000 to look at tracking cow weight over time!
There are 2 tables:
- main table
- weight table
I want to set the main table's January weight to a value from the Animal weight table (logical expression):
UPDATE [main table]
SET [main table].Jan07 = [Animal weight].[Kg]
WHERE [main table].[Line no])=[Animal Weight].[Line no] AND
[Animal weight].[weigh date]= 10/01/2007;
I have tried several times to get this working, but it tends to prompt for the weight to be given as an input.
Any ideas?
many thanks
Lactaman
View 4 Replies
View Related
Sep 21, 2005
Hi I wonder if someone could help as I'm relatively new to this. I have tried to search for my answer but I'm not finding stuff that answers my need.
I have 1 table with products (tblProds) and 1 with stocklevels (tblprod_Stocklev). the PLU field is in both tables
tblProds tblprod_stocklev
PLU PLU
Descritption StockLevel_1
CategoryMaster StockLevel_2
CategoryGroup StockLevel_3
Category StockLevel_4 etc....
My query filters using 3 combo boxes using the category fields and the Option group sets its value to the corresponding number in the stocklevel table from a form (1 for stocklevel_1 etc). I have the category filter working as I need (ie selecting all records if left blank)
So to the question: How do I get my query to retrieve only the stocklevels for the required branch? :confused:
Any help/advice is much appreciated :)
View 1 Replies
View Related
Feb 24, 2013
I've inherited a data base which has the address details of our members spread across multi fields i.e. Add 1, Add2, Add 3, Post town, Post code etc.
Not all the fields contain information which means when I do a mail merge for address labels there are blank lines.
I would like to either be able to create a single field in the table (like a memo field for example) which contains all the address detail, or create a mail merge without blank lines.
View 3 Replies
View Related
Sep 26, 2006
Hello,
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!
Many thanks,
voiD
View 2 Replies
View Related
Jan 4, 2006
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
View 3 Replies
View Related
Aug 7, 2006
Hello all,
Does anyone know how I can make this code search the captions instead of the Control Sources: :confused:
Option Compare Database
Option Explicit
Dim mstrFormToSearch As String
Private Sub cmdFind_Click()
Static strLastFind As String
Dim ctlFocus As Access.Control
Dim strTemp As String
Dim I As Integer
If IsNull(Me.TxtFindWhat) Then Exit Sub
With Forms(mstrFormToSearch)
.SetFocus
Set ctlFocus = .ActiveControl
On Error Resume Next
strTemp = ctlFocus.ControlSource
If Err.Number <> 0 Then
For I = 0 To .Controls.Count - 1
Set ctlFocus = .Controls(I)
If ctlFocus.Enabled = True Then
Err.Clear
strTemp = ctlFocus.ControlSource
If Err.Number = 0 Then
Exit For
End If
End If
Next I
End If
ctlFocus.SetFocus
On Error GoTo 0
End With
If Me.TxtFindWhat = strLastFind Then
DoCmd.FindNext
Else
DoCmd.FindRecord _
Me.TxtFindWhat.Value, _
acAnywhere, _
False, _
acSearchAll, _
False, _
acAll, _
True
strLastFind = Me.TxtFindWhat
End If
End Sub
Private Sub Form_Open(Cancel As Integer)
On Error Resume Next
mstrFormToSearch = Screen.ActiveForm.Name
If Len(mstrFormToSearch) = 0 Then
MsgBox "There's no active form to search!"
DoCmd.Close acForm, Me.Name, acSaveNo
End If
End Sub
Thanks :)
View 2 Replies
View Related
Sep 25, 2014
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
View 8 Replies
View Related
May 20, 2015
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)?
View 14 Replies
View Related
May 7, 2015
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.
View 13 Replies
View Related
May 7, 2015
Won't the captions reflect on Queries as Query Column Headers? If it is, how to make it reflect...
View 3 Replies
View Related
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?
View 1 Replies
View Related
Jun 26, 2014
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.
View 12 Replies
View Related
Jul 28, 2014
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?
View 2 Replies
View Related
Nov 7, 2005
Hi Folks,
I'm working on an order management database for a small company and have an order details form which I hoped to list each product of the order. As each customer has a different price per product I have a combo (based on a query) to choose the product and display the unit price (working fine) - the quantity and product ID are also input on the form and stored in the order details table (un-tested). My problem is on the first line of the order you choose the product and it and relevant details are shown, however, on line two, three etc when you choose the product - the other lines change to this too. How do I fix this???
Many Thanks in advance for help given!!
Mary
View 6 Replies
View Related
Jul 6, 2005
I am almost finished this project. :p There are just a few things left that I would like to do and I need some help.
1. Add an email notification when data on the form has been edited
2. Filter the form for only OPEN orders, status not equal to 6 or 7
3. When an order is closed (status field) I would like to default the "Date Closed" to today, but allow the user to edit the date if need be.
4. Once the status is closed and the date closed is entered, ask the user if they would like to create a followup order.
I have most of #4 done. I added code on the After Update event on the Status field to set the Date Closed to today and then disable the control, then ask if they would like to create the followup order. The users would like to be able to modify the date closed if they don't happen to do the entry until the next day. I have tried adding my code to the After Update of the date (which is updated with a pop up calendar), but once I select the date from the calendar, the focus stays on the date and the user is not prompted to create the followup order.
Any help you can offer would be wonderful
Thanks
Pat
View 2 Replies
View Related
Oct 8, 2004
I have extensive experience of other SQL databases but, in Access I don't know how to access the SQLCODE (as it would be in other DBMSs) to see if my query worked and if it did then how many rows were updated.
Anyone speak my language?
View 4 Replies
View Related
Nov 16, 2006
Hello!
I have a problem figuring out a solution for following problem.
I have a database of details and their properties.
All the details have been described in one table.
As there is a need to describe groups of details I have found myself in a hard situation that needs to be resolved.
The structure of described detail groups is as follows:
Product
Detail Group1
Detail groupx etc.
Detail4
Detail groupx etc.
Detail groupx etc.
Detail1
Detail2
Detail3
Detail Group2
Detailx
Detailx
Detail groupx etc.
Detail groupx etc.
Is there a way of decribing my products in access so that there are no limits of how many groups does a product have and how many levels of groups the product have.
Thank you
View 1 Replies
View Related
Apr 25, 2006
Hi All,
I am rather new to this and I must admit I am getting everything completely wrapped around my head!
I am developing a database that stores technical support requests received and their solutions. I have three main tables :
Problem - stores all the details of the problems received
Client - stores the address details of the client which is then associated with the 'Problem' table
Company - stores the name of the company which is then associated with the 'Client' table. This is a separate table as different clients can work for the same company.
At present, I have a 'problem data entry' form in which I enter all the details of the problem. At the top there is a section where I can do a search for a particular client and company and the details appear in the respective text boxs on the 'problem data entry' form. If the client does not exist, I have a button that I use to open another form which allows the entry of the new client's details ('New Client'). The user can choose which company this client works for by using a combobox. If the company is not already in the database, I have another button for opening a 'New Company' form!
Its all a little convoluted and it does not work particularly well to be honest. When I add a new company, I need to move forward a record and then back in the 'New Company' form in order that the new company information is saved correctly.
The company selection combobox in the form 'New Client' is then updated with the new company name BUT I need to actually open the combobox and select the company name myself for it to work properly! Once again I also need to move forward one record and then back again in order to properly save all the information before I can close the form.
What would be nice is to do a search for the the company in the combobox on the 'New Client' form, if the company is not found, it automatically adds the company to the database whilst updating all the necessary links. Hence getting rid of the 'New Company' form. I would also like to get rid of the problem of having to move forwards a record and then back again.
Any ideas? I find my method to be rather poor, there must be a simpler way of doing this!
Many Thanks,
Lee
View 1 Replies
View Related