I have a form which displays contact details for customers. I want to add a button to the form which concatenates name and address fields, adding spaces and line breaks, and then copies the full name and address so that it can be pasted into other applications (e.g. into a letter).
To do this requires that I implement some code to perform the following actions, but I can't figure out how to do it. Can anyone help?
1. Check Title field. If it is not null, take it's value and add a space after it.
2. Check First Name field. If it is not null, take it's value add it to the output of step 1 and add a space after it.
3. Check Surname field. If it is not null, take it's value and add it to the output of step 2 and add a space and a line break after it.
4. Check the Company Name field. If it is not null, add it's value after the line break and add another line break.
5. Repeat this for every field until the end of the address is reached, then copy the result.
I currently have two forms both usedfor adding new records into two different tables. The problem I am having was first that I could not simply bring the value in the ID field over from one form to the next. Now all I would like to be able to do is copy the value in the first ID and Paste in the second ID field on the second form.
I am currently getting an error possibly because the ID field on the first form in the Primary key for the table that form is linked to, on the second form however ID field is not the Primary key, I also can't make it the primary key because their are duplicate records that I cannot delete.
So... is it possible to get around this somehow to be able to copy and paste from one form to another?
I would like to create a command button on my form that copies values from 5 fields in the current record into a new record leaving all the other fields blank except for the new record ID.
The fields that contain the data that I want copied into a new form are:
hi! I've a question.. I've a form with two fields (min and max). How can I copy those two fields in another form and generate a list of values that are between min and max?? the two form and the data are not linked with tables..
Lets say I have table with one of the column header as notes. The notes is of type 'text'
In the notes column information like the following is typed out
MAX O.D 3.456" Min ID 1.2" and OAL 3.4"
or
MAX O/D 5.456" Min I.D 1.2" and Min Length 4.4 inches
I want to pull out the first numerical value (3.456 - first example, 5.456 -second example) and the last numerical value (3.4 -first example and 4.4 in second example). How would I be able to do this.
So the end result should be 2 more columns with max od as one and min length as the other. Regards George
I am running a database in which end users input values into a table via a data access page. The problem is that there are usually lots of records in this table which requires the same value for a particular field.
I was wondering if there is a way to implement something so that the user can input the value once and the value is then copied to all the records?
I'm populating a combo box from a query. I'm running a DCount on 2 criteria. The user selects the criteria from 2 combo boxes. If the user types * into the combo box, I want to be able to loop through each combination from the combo box values. I need to get the list of values from the combo box and put it into a string array, however it throws a type mismatch if I did something like BRANCHES(x)=CStr(cboBranches(x)) 'cboBranches(x)=cboBranches.Value(x) So I tried to run the sql from vb but found out that I can't return a string value from that (vb sucks). So I'm back to trying to get the values from the combo box. Any help would be appreciated.
I have this Sheet1 which is a manual input, I need to copy the values from Sheet 1 to Sheet 3, then I have Sheet 2 where there is data auto generated, How can I vlookup values copied from Sheet 1 and find it in Sheet2 ??? Is it possible using the vba code?
I should find the values copied from Sheet 1 in Sheet 2 and copy the values seen to sheet 3?
I have got like subform which I think is the tech term I use it to filter dates on field "date raised" and open's a report depend on date's entered in txtstartdate and txtenddate it works perfectly but I need to add some check boxes to check other field's are true/false ...
Code: Private Sub cmdPreview_Click() Dim strReport As String Dim strDateField As String Dim strWhere As String Dim lngView As Long
[Code] ....
I need to add code to the text in red well I'm guessing
here goes with what I would like to add job cancelled1 check box name field name= job cancelled job on hold1 check box name field name = job on hold void property1 check box name field name = void property
E.g. if I put date range in my date boxes and tick job cancelled show all record in that date range cancelled same with job on hold and void property
here some code I did but wont work as it not in the same strwhere above
Code: if me[job cancelled1] = true then strwhere = [job cancelled] = 1 'field name else strwhere [job cancelled] is null end if
Some how need to add the strwhere to the code above ...
I get an error for this code: this is the error, i can firgure out how to have the string not be the textbox, but sub in the texbox name.
Code: myFormstr = Array("F_Value1", "F_Value2", "F_Value3", "F_Value4", "F_Value", "F_Value6", "F_Value7") For Each mystr In myFormstr me.cboProduct = Me.mystr Next mystr
I have a table field which long ago was merged from several other fields. When the data was merged into the field it was delimited by "1." then "2." up to "5." Example: MergedField = "1.Animal 2.Large 3.African 4.Grey 5.Long Nose"
I now want to split it appart in a query where "1.Animal" goes into expression1, "2.Large" goes into expression2, etc.
I need to base the text on where the one number begins and grab everything until the next number in the mergefield is detected.
I have one field where string contains several words separated by semicolon and my goal is to be able to remove duplicates within the string and keep only unique values. Here is an example:
My db contains an unlinked form that is used to append records to 1-3 separate tables (tests to see if master records exists, appends if needed, moves on to child records). One of the fields is a text field meant for notes. The VBA errors out whenever this text contains apostrophes or quotes.
Is there a simple way to recall the string field with quotes and apostrophes intact and append it, or will I have to validate and remove them from the string?
I have to join multiple values into a string for summarizing data on reports and exports. This process in vba is taking up to 10 minutes to process and will get worse as the size of these reports grow.
My method so far is to query the individual items into a recordset, loop through the values, adding them to the string then return the string in the query.
Here is an example:
Public Function SO_Description(intSO As Integer) As String Dim db As DAO.Database Dim rs As DAO.Recordset Dim strSQLSelect As String SO_Description = "Profiles: " Set db = CurrentDb
The underlined part (acCmdRecordsGoToNew) is false part of this code, because it copies the Adress Info to a new record, instead of copying it in the same.
-Is there someone that can help me with this problem, to make the copy-button in the Form run properly?
-Are there other options to achieve te same?
I have put in a attachment, to give you guys a visual example of what I mean.
This is actually a rephrase of the scenario I posted in the other thread yesterday.
I have a form, titled "Danish", now i wan to make a copy of it, i.e, its textboxes, buttons and save the new form as "English". How can i perform ALL of the above in coding?
If I have a form based on 1 table and want to create an almost identical form based on the same table, how do I do it? I need to delete only 5 fields from 1st form and then add 5 different fields. All fields for both forms would be in the same table upon which they are based.
I was looking for some help. I am trying to setup a table with a field for web address. People are entering www.website.com etc however I need them to make sure it starts with http:// Is their any way I can put validation on the field to make sure that this is entered? Or maybe I could use an input mask?
I have built a database using Access 2010 using the 'web' format for the forms, reports and tables.
This has been fine so far as I have been using macros for my clickonevents.
However I now need some functionality not available in the web forms macro expression builder. Namely Openquery, (it is not on the available list). I therefore want to copy my forms formatting and properties to a normal non-web form allowing me to enter vba code.
Is there no way of doing this though - will I have to redesign the form again from scratch?
In the database I am developing, users have to be able to copy a table, no data, structure only. The source table is always the same one. Users have to be able to specify the name of the new table. I would like to have them do this on a form, easy of use is important. Any ideas on this? Thanks. Trucktime
i have 3 tables inventory and sales and order and i made 3 forms for each table
in inventory form the user will only read the data
in sales and order the user will enter and delete the data
so my problem is i want to know how when the user enter the data in order form all the data will be copy in inventory table so what ever added in order table it will be copy or updated to inventory table
I have read some of the posted threads. But I still couldn’t understand on how to solve my problem.
The scenario
I have 2 forms which linked to 2 different tables with the same attributes.
Example: Form 1 links to table 1.Collumns (index,name,address) Form 2 links to table 2. Columns (index,name,address)
The problem
How do I replicate the same data from Form 1 to Form 2 with Single button / command?
The Objective
What I’m trying to do is to create an auto fill function so that user do not have to type in the data into form 2 / table 2 by referring to form 1 / table 1.
I know how to print out a copy of a form that has no sub-forms as part of it. For those of you trying to do this, open the objects menu and click on Forms. Right click on the form you wish to print and save as a report. Open the reports menu and print the form. Suggest you eliminate colors or your ink supply will run out quickly.
Anyway, I am looking at trying to print the form with the sub-form showing as part of it. It is only for presentation purposes to show the End Users what the form will look like and ensure that all requirements are met. I could do a print screen but that only works if the form is smaller than the screen.
I have 2 different sets of tables,forms and queries, one for quotes and the other for orders.
All is basically simalar but the reason why i did not combine the two in one set of tables and queries is because after a certain time i want to delete some quotes and would also have too many fields in one table to manage.
Both have a main form (own table)with customer detail and then the subform (own table) contains various fields with data relating to products.
My problem now is because one in 5 quotes get accepted i want to just copy one field from main quote form to main order form and then 6 fields from quote sub form to order sub form, the rest of the info will have to be put in manaully in the orders form and sub form.
I thought of running a macro to open order form but not sure how to populate the relative fields.
Any suggestions, prob simple way of solving this but i am self taught and therefore dont know it all.