Send Record "name" Fields To Label Or Textbox Question
Jun 7, 2007
Gooday all, i have a table that consist of 3 columns, name, address and telephone number.
The table consists of about 20 records. What i would like to do is simply show one by one all the names from my table sequentially upon clicking a button on my form. I dont mind if its shown within a label or text box on my form. I would see something like
"Processing <persons name here>"
with a interval of 10 seconds between each name. Any ideas?
Private Sub jobdatebox_GotFocus() Dim dteFormDate As Date dteFormDate = CDate(InputBox("Enter the date:", "Date Entry")) Me.jobdatebox.SetFocus Me.jobdatebox.Text = dteFormDate
the above code pops up an alert and asks the user to enter a date. this value is then stored in the jobdatebox control (jobdate field)
the jobdate field is a Date/Time datatype and is the first item on my form so when the form opens this pop up appears instantly (which is fine)
they enter a date as the following: 6 6 and it displays as 06/06/2006
my user tabs through the fields, inserting a record.. when they reach the last field.. and tab again (to enter another record)
the pop up alert appears again..i dont want this.. i only want it to pop up the first time (when the form is opened) and then just keep that value in the jobdatebox for the remainder of the form's open session
i need something that does the following..
on new record creation jobdatebox.value = dteFormDate (the value entered previously)
OR
Private Sub jobdatebox_GotFocus() Dim dteFormDate As Date dteFormDate = CDate(InputBox("Enter the date:", "Date Entry")) Me.jobdatebox.SetFocus Me.jobdatebox.Text = dteFormDate for all records entered until form closes
OR
just before new record is created if jobdatebox = not null (has a date value inside already) then newrecord.jobdatebox = previous record jobdatebox.value
Ok I saw this posted up in the forum but it was not explained.
I have a Query which asks for a parameter before giving an output.
I have a report that uses this query to display the information.
Ok what I am trying to do is create a form that has a textbox and I enter the parameter's information in that textbox or textbox. How do I send the information to the query?
The reason for such a thing is people tend to not follow the set guidelines for putting stuff in a parameter box. So what I decided to do was set up a calendar form which a person has to physically choose the date from the calendar and this leaves no room for real error. My problem is I can get the calendar information to the textbox or textboxes but can't figure out how to code the button to send the textbox information to the query & parameters & report, etc...
Can someone please help me out of this situation? or point me to a starting point?
I'm working on a report. I have a text box that contains directory path for a picture which is showed in a image box on my report which works great. I have now created a label called "nopiclb" that has "no Pic "entered in it but I want to set the label to not visible if path1 has a file path in it but visible if path1 is empty
I put the code below in onformat event in the detail section, but is not working
Code: Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If IsNull(Me.path1) = True Or Me.path1 = "" Then Me.Nopiclb.Visible = True Else Me.Nopiclb.Visible = False End If End Sub
I have a form with fields that contain the address/postcode etc of the person in question, and I also have a template letter that needs to have said persons address/postcode etc at the sending stage after a button is clicked.
What event would you use to update a label caption relative to a number field in the same form, so that each time a new record is displayed, it goes through my complicated "if" bva code. I want the letter "th", "st", "rd" to display beside a text box relative to the value displayed. I suppose I could do this in the query. :confused:
I have an access form of locations to manage (that are labelled Loc-01, Loc-02, Loc-03) and I'd like a label that automatically shows which record is currently open (rather than a text box). Is this possible? Or if that's not possible, I don't want the textbox to be editable in the form.
I have a situation where two clients will be using the same database design - one of them will be sending information from his database for the other client to add to their database.
This will be on a record by record basis. The form that has the info entered into it also has a subform.
How do I export a single record between databases that have the same fields? I know how to export a table, but not a single record. The fact that the record that needs to be sent is from two tables (ie the main form and the subform that collects the data for those tables) further complicates things for me. Any ideas? :eek:
I'm new here, mostly learning to do stuff by trial and error. I have a sneaking suspicion that I could easily search out the answer to my question if I had the right vocabulary, but I don't think I do...
Anyway, my question, hopefully you can help me with.
I've got a tabular form that has a couple of comboboxes, and then a text label:
ComboA....ComboB....Label
What I'd like to do is change the label for each row based on the Combobox data...
That's what I want. How I'm currently doing this is having a Sub called whenever the Combo boxes are changed, to change Me.Label.Value to 3, in this example. Of course, what instead happens is I get...
Which is not what I want at all. Is there a way to change the value of the label in(for instance) the second row, without changing /all/ the labels in the continous form? I'd be really handy to know how to do that, but I just can't puzzle out a way.
If that's not possible... Any other way to get my labels to display the information? Part of the problem is that my function relies on information stored in variables in my form, and I'm not sure I can access those just from the source propery of the label... What I need, essentially, is to put in Label's value the result of MyFunc(ComboA.Value,ComboB.Value,formvariable1,for mvariable2).
I have a query that returns several records, typically 1 to 5. I need to print a label for each record returned by the query. Printing a label is no problem, but how do I print sequentally for each record in the query?
OK - bit of a newbie here & maybe this question has been asked a thousand times but i can't find any answers that cover this question properly.
Basically i am writing an access database that stores contract information, contact details, orders etc etc. I want to take the Order Number field, along with the Client Name & Address etc and post it into a Word Mail Merge type document, then save that file as ordernumber.doc after checking to see whether it already exists.
I have successfully managed to send the information into word in a mail merge document & get it to save the file using the ordernumber.doc format, however it is saving it to mydocuments folder and i want it in a subfolder called orders (that does exist). It is also not checking to see if that file already exist and overwrites it if it does.
I want to change the path to where the file is being saved, check whether it exists already, then ask me whether i want to overwrite it or save as something else.
Any help would be most appreciated. BTW I am using Word & Access 2003.
*****THIS IS THE CODE I AM USING***** Private Sub NewEternit_Click() On Error GoTo NewEternit_Err
Dim objWord As Object
'Start Microsoft Word. Set objWord = CreateObject("Word.Application")
With objWord 'Make the application visible. .Visible = True
'Open the document. .Documents.Add ("\shentcDocuments and SettingsJohn.SHENTMy DocumentsTemplatesEternit Order Merge.dot")
'Move to each bookmark and insert text from the form. .ActiveDocument.Bookmarks("orderno").Select .Selection.Text = (CStr(Forms!frmOrderDetails!ContractNo) & "/" & (Forms!frmOrderDetails!OrderNo)) .ActiveDocument.Bookmarks("Date").Select .Selection.Text = (CStr(Forms!frmOrderDetails!Date))
'Print the document in the foreground so Microsoft Word will not close 'until the document finishes printing. 'objWord.ActiveDocument.PrintOut Background:=False
' Save the file using orderno field Dim FName As String FName = Forms!frmOrderDetails!OrderNo & ".doc"
'Quit Microsoft Word and release the object variable. 'objWord.Quit 'Set objWord = Nothing
I would like to be able to place a button on my invoice form that will allow me to e-mail the individual invoice to the person being billed (the e-mail address is included on the form). I created a macro that works to send a PDF file of all of the records and I am having trouble figuring out how to send just the current record. I would also like to have the e-mail address automatically populated based on the e-mail address on the current record.
What I'm try to do is attach any files from the attachment field from the current open record to email i have some code i have manage to get files from the open record to save to destination /temp folder to work so outlook can attach the files but outlook is not opening or putting them in to email also have problem's that i have highlighted in the code in red.
Code: Private Sub cmdEmail2_Click() Dim outlookApp As Outlook.Application Dim outlookNamespace As NameSpace Dim objMailItem As MailItem Dim objFolder As MAPIFolder Dim strAttachementPath As String
I've created a button on my ACCESS 2010 form that will send a PDF via email. However I only need to send the single record displayed on the form not all records.
The on click command of the button sends the PDF of the report. (I read that this is what should be sent; but still get the same results.)
I don't understand how and where to attach VBA code:
I have 2 form, form1 and form 2 (picture attached)
In Form 1 (main form) there are "reference" field with key pressed event then call form 2 (list of reference that user can choose)
In form 2 the problem is, when "enter" key pressed (keypress event), selection will move to next record so the data that transferred to form 1 is wrong (next record)
The question is : how to save current record in form 2 before enter and send the data to form 1
I'm new to access and I'm struggling with the transfer of a form we use for fieldwork. I want a technician to be able to come in from the field and enter data in a way that is visually similar to how the collected it. To do this, I have created a form that is structured like this:
View 1 View 2 View3 View4 Sediment % XX XX XX XX
In the table 'results' , I would like to collate the information in what I call 'flat format', which is structured like so:
Site Date Parameter Value
XX XX SedimentView1 XX XX XX SedimentView2 XX ...
The thing is, I can only figure out how to assign a text box to a single field, i.e. value. What I need is for the field 'Parameter' to autofill based on the value-textbox name, e.g SedimentView1. Is there some simple way to do this?
I am building a database through access 2003 and have included a text box labeled "comments" in my design view. Now when i go to input information in the "comments" column in the datasheet view, the same text will appear for every entry. If I try to change the text in the next row, it will automatically switch all of the previous "comment" text to whatever I have entered. How do I fix this?
Right what im after sounds complicated but its quite simple.
I have a client database, in this database each client has 3 skill fields, i also have a form with a listbox and an unbound textboxes that are linked to the query so when the textbox is typed in the listbox updates.
Now ive sorted out the problem of not all fields showing it some of them are blank now the problem is.
When input text into one of the boxes the listupdates, now if theres text in two boxes. and theres data in one of each that matches it will show neither, because the query is looking for data that matches in both fields, now i need partial matches so it will give results of data in both fields.
not understanding fully what i mean?
i have zipped my db, if you open the db then open the form 'MainListRecTrades2nd' and fill in data in both primary and secondary trades that matches from the list you will see.
http://awilderbeast.com/CWSystem.zip
The solution i was thinking of would to have 1 textbox that searches all the fields and displays data from any of the fields in the list
I have a two tables one contains a list of phone lines, the other contains fields named Date, Line Number, and Number of Calls. I want to make a form that will allow the user to enter the number of calls received each day for each line. I would like to have the lines displayed in several text boxes with text boxes next to them where the user could enter the number of calls. I could use static text boxes to list the lines but the lines change often and I want them to get their values from the Lines table.
I haven't been able to find a way to write an expression or code to set the default value of the text box to a specific record. Is this possible? I figured the expression for the default value would look something like this [Text1].DefaultValue = [Lines]![Line Number].Record1, Record1 being the specific line I want displayed in the text box. Anyway of doing this?
I have a form (frmHourEnter) with a textbox (Week_No_Calc) which has a calculation, in Control Source, based on another textbox. After exiting from Week_No_Calc how can I get a field (Week_No) in table (tblHourEnter) to be updated with the calculated value?
Basically I want to type the ID(key) of a record table in a unbound text box and then by pressing a command button to be able to bring up that record (in form view). I do not want to use a combo-box.
So what do i write as VB code in the Private Sub mybutton_Click()
Table name is [ACTION_ID], ID field name is [ACT_ID] & text box name is [TEXT_BOX]