I am creating my first form and a field that holds a price is showing that as 000000.00 I would like to eliminate trailing zeros and can find nowhere in a properties to do that in form properties.
I have a table called Books, in that table there is 4 columns ChapterName, Auther, ITEM, Price.
Each book has a item number, and each book has a few records with the same data, just the first column is different where its the ChapterName, each book has a price, but only once, meaning in the first record of each book it will be a price in the column price
Now I want a Query where i can get which book dont have a price at all, and which book has more than once a price, how can i do that?
I have a accdb pointed at Sql Server 2012 via ODBC pushing text from a text box back to a Sql server's column that is a nvarchar(10) to store zip codes.
Edit: I confirmed that the accdb's linked table has a datatype of text for the zip code column.
Oddly, the Access form's textbox is sending back the text, but stripping out the preceeding zero in the zip code - almost like when excel (shudder) strips the preceeding zeros away from SSNs and Zipcodes - treating them like a number - and not text.
How do I stop this?
The form object is a text box, and the sql server backend doesn't mind the preceeding zero. When I manually set the value to = '01111' using sql server management studio, the value is accepted - and then later viewable (with the zero) when using the accdb's form...
This leads me to believe the form is stripping away the zero when inserting the record. The add records button uses the following to insert the records:
Code: Private Sub btnAddDioOffice_Click() Dim strSQL As String If ListBoxDios.Value <> "" And txtDioOffName.Value <> "" Then
As part of an extraction program I'm making, I've got a table (lets call it TABLE1) with values that have trailing spaces e.g. "ENGINEERING ", "LOGISTICS ", etc....
This has been set up as such to match the values that exist in a read only table I am linking to from another database.
I have used a query of TABLE1 as a row source for a combo box. When the values are selected in the combo box the trailing spaces are lost.
I have tables that get their data from SQL server. Some of the fields in the table have trailing spaces. Does this issue need to be resolved in SQL server or in Access?
I have a query that I need to add trailing spaces to. I have a query that pulls the first and last name of our employees, but after the initial text, I need to add spaces up to 20. So the text of the first name plus spaces would be 20 characters and the last name in a different field would be last name plus spaces would add up to 20.
Hi, I am creating a csv in another application where fields may contain trailing spaces. If I open this in excel, the trailing spaces are preserved, but if I import into Access I lose the trailing spaces. Is there any way to preserve them? Thanks, Dave.
For some reason, whenever I export a query to text, every number has trailing zeroes after it. This happens with any number, even integers.
Examples:
1.000000000 5.250000000 0.600000000
Nine decimal places would be fine if the number extended that far, but I want to get rid of the trailing zeros so that 1.0000000 becomes 1, and 5.2500000 becomes 5.25, etc.
Now, I have noticed that a setting in the Control Panel > Region and Language > Formats Tab > Additional Settings > Numbers Tab controls the numbers of decimal places, but if I adjust it to two or zero it just cuts the data off at that point.
I have two list boxes on a form. The first listbox contains CATEGORIES and the second contains ITEMS that belong to respective categories. So, when i click a category the next listbox displays the items that belong to that particular category.
I need to know how to add new items to a selected category and also delete items from a selected category. If no category is selected or item already exixts, item should not add.
I need deleting a file from a ftp server. I have the code for uploading but I can't seem to figure out how to delete a file. This is the FTP module I'm using
Code:
Public Sub UploadFileToFTPServer() On Error GoTo ErrHandler Dim lngRet As Long Dim abytData() As Long Dim lngBytesWritten As Long
[Code] ....
And this is the code for uploading i use in the form when i click a button
Code: Dim objFTP As FTP Const conTARGET = "ftpserver" Set objFTP = New FTP With objFTP
[Code] ....
All that works like a charm.
Code to delete a file from the ftp server, i'm kind of stuck.
I have 2 sub-forms attached to a main form. Each of these forms are based on different tables. Whenever I input the record, it goes into respective tables. However when I try to delete the record, it only deletes the record from the main form. I tried cascade delete. However, since referential integrity has to be established, I cannot add the record to my subform because there has to be a corresponding record in the parent table for me to add the record in the subform.
I have a main table which records employee,date,record employee is related to tble employee. i want to be able to delete an employee however keep the referenced records with the name, date, record, is this possible?
I have a form, with tab control which includes fields from two tables. When I delete a record on a form it deletes fine.When I go into the tables the record is still there in the one side of the relationship but has been deleted in the table of the many side.
I've read that a simple delete button on a form will only delete records in the many side of a relationship from a table.How do I get a delete button that deletes the record from both the one and many tables.
I have a continuous form with a button(delete). on click event I want to delete a record on another table. I though about doing this via a delete query. The sql is below:
I'm an amateur (is there such a thing as having databases as a hobby?) with little training. I volunteered to organize a growing volunteer group I'm a part of by making a simple database for the volunteer office staff. One of the things I want it to do is make name tags for our weekly meetings. I don't want to print one for each name on our list because the list is over 400 names long with only around 35 regular attendees. I made two tables--one is the MakeNameTag table that lists regular attendees (it is a lookup field on the Names table).
The other is the Absences table. It has two fields; DateOfAbsence and MakeNameTag. If someone misses a meeting (does not pick up their name tag), their name is added to the Absences table. A query then filters the table for dates in the last 28 days. If their names shows up four times in the last 28 days I want for their name to be deleted from the MakeNameTag table. How to do that automatically? Our office volunteers have minimal PC skills, so the solution needs to be very user-friendly.
I want to make a delete query, which delete record between certain dates, I want access to ask user to specify range of date before executing the query.
When I had a subform (continous form) I had a code which check, that record was used in other form, if yes, then code not allowed to delete this record, if not, record was deleted. But now I have a datasheet form, and the question is, What should I do, to have the same results what I had in continous form.
Now it doesn't matter that I past this code in "Before Del Confirm", "On delete", "After Del Confirm", this code doesn't work in this view of form. Always if I click (right button) on record, then i choose "delete record" MS Access delete my record without checking that was used in other form or not.
Code: If Not IsNull(DLookup("Id_Gora_Zlecenia.Value", "TblDolZlecenia", "Id_Gora_Zlecenia.Value=" & ID_gora_zlecenia)) Then MsgBox "You can't delete this record because it is used in another form" Exit Sub End If DeleteRecord Me End Sub
DeleteRecord:
Code: Public Function DeleteRecord(ByRef f As Form) As Boolean DeleteRecord = False On Error Resume Next DoCmd.SetWarnings False If Not f.NewRecord Then DoCmd.RunCommand acCmdDeleteRecord
All I am trying to do is insert to have a form with a "Delete Record" button on it. The problem is I don't want anyone to be able to delete a record, I would like someone to have to insert a password to confirm the delete.
This is probably an easy question by comparison to some of these others.
I have a table where a transaction number is always 8 digits. If the number is not 8 digits, it should start with zeros, such as
12345 should be 00012345
123456 should be 0123456
Is there a simple and fast way to do this? It can also be done in a form, since I enter the data through there. Will it be necessary to change the field from a number to a text data type?
I’ve got a six-character text field with values like: 354, 7237, 10438, all values under six-characters long. I need to run an update query to place sufficient “zeros” in front of each value to make it a six-character value. There are 8398 records to change! Got an idea? Please lemme know. Thanks.
I am formatting a table to be exported via fixed width and one of the main frame requirments is to have the dollar amount with leading zeros. So if a dollar amount is 500.02, I would need to update the tables dollar amount to 00000000000050002. Since the dollar amount will change, I will only need the leading zeros for the blank spaces because the field is right justified (for the mainframe).