When getting input from the user and storing it into a struct, then writing that info to file using fwrite, it writes 2 of the same thing into the file.

When searching (using fread) the description (string) member, it will find 2 entries with the same information. But when I search for the number (int) member, it will only find the one.

Below is the add entry function and the 2 search functions (number and description). I pass the file pointer to each from main. There is also the output so you may see what I mean.

Code:
struct checkinfo
{
	int number;
	char order[40];
	double amount;
	char desc[80];
};

void update_add(FILE *fPtr)
{
	struct checkinfo check;
	char checknumtemp[4] = {'\0'}, tempResponce[1];
	char tempamount[18] = {'\0'};
	int userResponce;
	
	rewind(fPtr);
	printf("Please enter the following information to add a new check.");
	printf("? Check number: ");
	gets(checknumtemp);
	check.number = atoi(checknumtemp);

	fseek(fPtr, (check.number - 100) * sizeof(struct checkinfo), SEEK_SET);
	fread(&check, sizeof(struct checkinfo), 1, fPtr);
	//if check number is not 0 (empty) ash user to overwrite or leave alone.

	if (check.number != 0){
		printf("Check information has already been entered!\n");
		printf("Check\tPay to the Order of    \tAmount  \tDescription\n");
		printf("%-1d\t%-23s\t%-8.2f\t%s\n\n", check.number, check.order, 
											  check.amount, check.desc);
		printf("Would you like to overwrite this entry?\n");
		printf("1 - Yes\n2 - No ");
		tempResponce[0] = getche();
		userResponce = atoi(tempResponce);
	}
	//if user enters 1 to change, or the number is originally 0 (empty), use original
	//user input for check number, and get info into struct for rest of members. then seek
	//that position in file and write info. ***Seems like it saves it under the correct
	//byte location according to fseek but it stores the information twice, debugger [MV C++]
	//shows struct information being correct with only 1 set of entries per member.

	if (userResponce == 1 || check.number == 0){
		check.number = atoi(checknumtemp);
		printf("? Pay to the Order: ");
		gets(check.order);
		printf("? Amount: ");
		gets(tempamount);
		check.amount = atof(tempamount);
		printf("? Description: ");
		gets(check.desc);
		fseek(fPtr, (check.number - 100) * sizeof(struct checkinfo), SEEK_SET);
		fwrite(&check, sizeof(struct checkinfo), 1, fPtr);
	} else
		printf("\n\nOriginal entry was saved.\n");
}

void search_check(FILE *fPtr)
{
	struct checkinfo check;
	char checknumtemp[4] = {'\0'};
	int searchNumber, searchFound = 0;
	
	rewind(fPtr);
	printf("Enter the \"Check number\" to search for: ");
	gets(checknumtemp);
	searchNumber = atoi(checknumtemp);

	while (!feof(fPtr) && searchFound == 0)
	{
		fread(&check, sizeof(struct checkinfo), 1, fPtr);

		if (check.number == searchNumber){
			printf("Check found!\n");
			printf("Check\tPay to the Order of    \tAmount  \tDescription\n");
			printf("%-1d\t%-23s\t%-8.2f\t%s\n", check.number, check.order, 
												  check.amount, check.desc);
			searchFound = 1;
		}
	}
	if (searchFound == 0)
		printf("\"Check number\" not found!\n");
	printf("\n");
}

void search_description(FILE *fPtr)
{
	struct checkinfo check;
	char desctemp[80] = {'\0'};
	int searchFound = 0, temper = 0;
	
	rewind(fPtr);
	printf("Enter the \"Description\" to search for: ");
	gets(desctemp);

	while (!feof(fPtr))
	{              //read each byte location and put into struct check.
		fread(&check, sizeof(struct checkinfo), 1, fPtr);
		//compare user input with struct member '0' = exact match.
		if (strcmp(desctemp, check.desc) == 0){
			if (temper == 0){ //if this is first entry found, print title.
				printf("Check found!\n");
				printf("Check\tPay to the Order of    \tAmount  \tDescription\n");
				temper = 1; //set so title does not print again.
			}
			printf("%-1d\t%-23s\t%-8.2f\t%s\n", check.number, check.order, 
												  check.amount, check.desc);
			searchFound = 1;
		}
	}
	if (searchFound == 0)
		printf("\"Description\" not found!\n");
	printf("\n");
}
Here is the output I get after I enter 1 entry.

Code:
Please select from the options below.
        1) Search.
        2) Sort.
        3) Update.
        4) Exit.

        Selection: 3
What would you like to do?
        1) Add entry.
        2) Delete entry.
        Selection: 1
Please enter the following information to add a new check.
? Check number: 160
? Pay to the Order: Stumon
? Amount: 145.65
? Description: Blah Blah

Please select from the options below.
        1) Search.
        2) Sort.
        3) Update.
        4) Exit.

        Selection: 1
What would you like to search for?
        1) Check number.
        2) Pay to the Order.
        3) Amount.
        4) Description.
        Selection: 1
Enter the "Check number" to search for: 140
Check found!
Check   Pay to the Order of     Amount          Description
160     Stumon                  145.65          Blah Blah

Please select from the options below.
        1) Search.
        2) Sort.
        3) Update.
        4) Exit.

        Selection: 1
What would you like to search for?
        1) Check number.
        2) Pay to the Order.
        3) Amount.
        4) Description.
        Selection: 4
Enter the "Description" to search for: Blah Blah
Check found!
Check   Pay to the Order of     Amount          Description
160     Stumon                  145.65          Blah Blah
160     Stumon                  145.65          Blah Blah
P.S. By the way, the main function opens the file using "r+" because I have already written a program that will write the existing user information using "w" quickly and easily and save the file. This means there are not any repeat entries. There are about 10 entries at this point, but none with check number 160, that location should be blank because the previous program wrote 0 - 99 sizeof(struct ...) byte locations to {0, "", 0.0, ""}. Everything but those 10 locations about have 0's or blanks not garbage. Please email me if you would like the source to both programs to check any further information you will need in helping me. Thanks in advanced.