I am designing a book collection database where each book can contain multiple authors. I used three tables; tblBooks, tblAuthors, tblBookAuthorJOIN. The tblBookAuthorJOIN allows me to create a subform with drop down combo boxes in the Books form linking multiple authors to each books indexed field. The Author table contains the usual FirstName, LastName, MiddleName fields. I would to be able to display the names of each author in the forms header but I am having difficulty.
For example a book may have two authors such as:
Authors table would contain values such as
Last Name: Grisham First Name: John
Last Name: Twain First Name: Mark
Textbox in header would display: John Grisham; Mark Twain
The authors would be displayed in the following format in the same order as listed in the subform datasheet.
I am trying to clear a textbox after the user enters an invalid date and I do not know why the following code is not working:
Private Sub txtStart_AfterUpdate() If Not IsNull(Me.txtStart) Then If Not IsDate(Me.txtStart) Then MsgBox "You have not entered a valid date" Me.txtStart = Null Me.txtStart.SetFocus End If End If End Sub
If I have a text box (Text1) on my form with comma separated values entered i.e. 100,120,250,300 what would be the easiest way to enter these into a table column with a button click event. I would like to enter these values into my table tb_test under column Values.
I have a textbox & button that when entered & pushed - run a query for the top values randomly depending on the value entered into the textbox.
My code is...
strSQL = "SELECT TOP " & Me.Text140.Value & " [CAN - NAME].Name, [CAN - CPT/VOUCHER].Voucher_Number, " & _ "[CAN - CPT/VOUCHER].Procedure_Code, [CAN - CPT/VOUCHER].Service_Date_From, [CAN - CPT/VOUCHER].Patient_ID, [CAN - CPT/VOUCHER].service_id, Rnd([service_id]) AS RandomNum " & _ "FROM [CAN - CPT/VOUCHER], [CAN - NAME] WHERE [CAN - CPT/VOUCHER].Service_Date_From Between " & Me.StartDate.Value & " And " & Me.EndDate.Value & " ORDER BY Rnd([service_id]) DESC "
It runs like it should but doesn't populate any records...that is until I go into the design view, deselect one of the fields and then reselect the same one - only then does it populate.
Do I need to open the query first and then update/append instead?
I have a table setup to enter dates for each person that requires safety quizes for the month those that don't have an "N/A" for the month by thier names.
Each year I have to start over and it is a real pain to manualy delete all the dates for each person for Jan through December. I only want the dates gone not the name or the N/A values.
Is there a sub or query that will search each record and only delete the dates?
Access 2010 - I would like to use DLookup to show results values from a table and display in a unbound textbox on a form. the results from each column in the table need to be on seperate lines, a break if you may. Here is the code I have so far.
I have a report in which a textbox generates numerical values and letter values. I want to...On report load - if textbox = numbers then hide otherwise show if it contains letter values.
I am working on form where the user selects either "IN" or "OUT" from a dropdown of field name "CheckOut" in Frm1.
If they select "OUT" they will in turn need to fill in 2 additional fields. When they change the value back from "OUT" to "IN",
I want those other fields to be cleared of data for just this record so next time they change back to "OUT" from "IN" those 2 additional fields are already blank.
There is a text box in a form that user can enter the value. How can I check if the value entered by user is already existed in the record of the linked table or not? If the value (or record) do not exist, that new value/record will be added to the table. If the value do exist, just show the msgbox to indicate.
I have a date textbox (Week_Ending) and number textbox (Staff_ID) in a form (frmHourEnter), when both have values I open another form (frmStaffReport) with textboxes (txtDateStart and cmbStaff).
How do I open the second form with the values of the first form pre-entered?
I have a database for billing. In my database, I have a form that consists of a main form "Order" and 2 subforms "OrderDetails" and "Customer" OrderDetails are to enter the products to be connected to the Order. All function super, but I want to have some information from one of the forms "copied" over to on of the others.
Here is what I would like
In the subform "OrderDetails" I have made a textbox that summarize all prices to a total, his tekstbox i called "Tekst31". I would like the amount in this textbox to appear in a field "Bel�b" in the main form "Order".
I have tried some different commands, but nothing has worked, also I have made a query which dose the same ting as the tekstboks, as the information in that tekstbox it not stored anywhere.
I am having problems getting Access to evaluate whether a textbox is empty using VBA behind my form. I'm currently using Access 2000 on a Windows98 machine, but I also tested this in Access 2003 on an XP machine and got identical results.
The way I’d like the code to operate is if the “Product1” field is empty, the value taken from another form would be pasted there, and if it isn’t empty, go to the “Product2” field and if that field is empty, paste it there, otherwise go to the “Product3” field, etc.
I have tried using If IsNull(“Product1”) Then… but Access seems to think that the unbound textbox with no default value isn’t empty.
I tried using If ("Product1" <> "*") Then… but Access again seems to think that there is something in that unbound/no-default value textbox.
ElseIf ("Product2" <> "*") Then DoCmd.GoToControl "Product2" DoCmd.RunCommand acCmdPaste …
End If
I admit that my VBA skills are limited, but after having scoured these forums as well as Access help and examining the logic of my code, I am completely stumped. Any suggestions you can offer would be greatly appreciated!
I have a textbox on my main form that calculates the total of a field on the sub-form. It works well and display the correct ammount on the textbox when I load up the form, but if I do changes the values of the sub-form it doesn't update at all ! I need to close and open the form again to see the changes.
How can I update the textbox so it always reflect the values on the sub-form?
I have created a report and i am having trouble with the =Sum() function. I would like to sum all the values that are held in a text box which has the expression of '=[BookingSF_Qry subreport].[Report]![TotalSF]*[HowManyDays]'. No matter what i try i cant get a total value of all of these.
I am using my form to add job descriptions and if the user checks the check box for current, it adds the description to the table as the current job description. I need to clear the check box for the next entry but the box retains the choice so when the user selects another description, the form saves it as current even if the box shows no check in the box. I tried the code below, but that only changes the state of the box, but not the reality of the state of the box.
I have a form in which the user has the privilege to download some data from the table.the user will paste some of the numbers to the textbox from the excel in order to download the specific data.i need to write a query to parse the textbox using the in condition
I'm completely new to Access and would greatly appreciate your help in this problem.
I have a form name frmDataEntry with 10 fields, which enters data through an append query in Access. Firstly I was wondering whether I could do mutiple data entries, say 5 different entries of 10 fields each at the same time? Secondly, I wanted the form to clear all the entries after the user has submitted the data(I have made a submit button for this). I would greatly appreciate it if you could help me overcome these problems.
In that form I would like to have different check-boxes (three of them), representing actions done that day.
Let's say each form represents a contact, and I need check-boxes for:
- Called - E-mailed - Visited
This is something I am now able to do. But.... I would like these check-boxes to be cleared automatically the next day.
So when the database is opened the next day, these check-boxes start unchecked.
And I would also like that as soon I check a check-box on a certain day, there is an entry for that action and date is being entered in the record of that contact, so I am able to check later on what day, what action was performed.
Im doing an attendance in Access database , i have a Staff table and AttendanceMain table for keep all the staff attendance ...
I also created a query to append the data into AttendanceMain table ... the problem is , I always reuse the staff name , so i created a Staff form , but everytime i open the staff form the previous record still there , anyway to clear the "Tick Box" in staff table and without affecting the name ?(Name also is a record in row by row)
I have a text box on 'Forma' & a textbox (named text3) on 'Formb'. I want to copy the contents of the textbox from 'Formb' to the textbox on 'Forma'. I have used the following code in the textbox on 'Forma'....
=Forms![Formb]![Text3].text
This doesn't seem to be working whether both Forms are open or only 'Forma'. Could somebody please advise as to what I am missing. Your assistance is very much appreciated.
Hello the problem I am having is that when I imported data from excel, it somehow placed carraige return at the end of the text box ( this is what I believe), this is a problem because in that field is a drop down box and it complains about my value not being valid. I press the del key behind the value and it doesnt complain. Can anyone help me?
a.) how to also stop a leading zero (e.g. don't allow 04, but allow 4) b.) Don't allow any combination of numbers to be outside 1 to 36
Yes, I can do this on a validate event after the fact. Just wondering if there is anything that could put this all into the KeyDown event to prevent errors in the first place.
This code works great to prevent any key entry except 0..9, Tab, and backspace
Code: Private Sub txtSectionNumber_KeyDown(KeyCode As Integer, Shift As Integer) Select Case KeyCode ' only accept a number 0 to 9 Backspace or Tab Case vbKey0, vbKey1, vbKey2, vbKey3, vbKey4, vbKey5, vbKey6, vbKey7, vbKey8, vbKey9, vbKeyBack, vbKeyTab ' do nothing and accept the value Case Else KeyCode = 0 End Select End Sub
In the US Western States, a survey township is simply a geographic reference used to define property location for deeds and grants as surveyed and platted by the General Land Office (GLO). A survey township is nominally six by six miles square. They are assigned numbers of 1 to 36.