mohamed aqeel
New member
- Local time
- Today, 03:02
- Joined
- Jan 25, 2012
- Messages
- 7
Hi friends,
I am developing a database for a small organisation.
I linked 6 tables(basic info,educational info,employment info,passport info,leave info,personal info) in one tabbed form.For all the tables i have used emp id as the primary key.(for data entry).
I have created a similar form for data modification also.
The problem is i am able to view only the records for which i have entered all the information(i.e atleast one entry in a table). As i already mentioned in the tabbed form if i didnt specify the values for 1 table (i.e) 1 tab, then i am not able to retrieve the whole record(even if i entered all the values for all the remaining tables(remaining tabs))
please help to solve this problem...this is very essential because I cant enter all the values in the first attempt, so i need to enter the known values first, and only when i get the other details i need to search that record and i hv to update that record..
NOTE:
The records are being properly saved in the table.
for more clarity i will say an example.
For an employee
emp id: 101
name : abcd
I hv entered the basic info tab, (remaining tab if i don't fill up) that table is updated properly.but while searching this record i am not able to retrieve.Below is the code i hv used to search the record...
THANKS IN ADVANCE!!!!
Private Sub Command84_Click()
Dim strStaffRef As String
Dim strSearch As String
If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
MsgBox "Please enter the Staff Employee Id value!", vbOKOnly, "Invalid Search Criterion!"
Me![txtSearch].SetFocus
Exit Sub
End If
'---------------------------------------------------------------
'Performs the search using value entered into txtSearch
'and evaluates this against values in EMP ID
DoCmd.ShowAllRecords
DoCmd.GoToControl ("EMP ID")
DoCmd.FindRecord Me!txtSearch
[EMP ID].SetFocus
strStaffRef = [EMP ID].Text
txtSearch.SetFocus
strSearch = txtSearch.Text
If strStaffRef = strSearch Then
MsgBox "Match Found For: " & strSearch, , "Congratulations!"
[EMP ID].SetFocus
txtSearch = ""
'If value not found sets focus back to txtSearch and shows msgbox
Else
MsgBox "Match Not Found For: " & strSearch & " - Please Try Again.", , "Invalid Search Criterion!"
txtSearch.SetFocus
End If
End Sub
I am developing a database for a small organisation.
I linked 6 tables(basic info,educational info,employment info,passport info,leave info,personal info) in one tabbed form.For all the tables i have used emp id as the primary key.(for data entry).
I have created a similar form for data modification also.
The problem is i am able to view only the records for which i have entered all the information(i.e atleast one entry in a table). As i already mentioned in the tabbed form if i didnt specify the values for 1 table (i.e) 1 tab, then i am not able to retrieve the whole record(even if i entered all the values for all the remaining tables(remaining tabs))
please help to solve this problem...this is very essential because I cant enter all the values in the first attempt, so i need to enter the known values first, and only when i get the other details i need to search that record and i hv to update that record..
NOTE:
The records are being properly saved in the table.
for more clarity i will say an example.
For an employee
emp id: 101
name : abcd
I hv entered the basic info tab, (remaining tab if i don't fill up) that table is updated properly.but while searching this record i am not able to retrieve.Below is the code i hv used to search the record...
THANKS IN ADVANCE!!!!
Private Sub Command84_Click()
Dim strStaffRef As String
Dim strSearch As String
If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
MsgBox "Please enter the Staff Employee Id value!", vbOKOnly, "Invalid Search Criterion!"
Me![txtSearch].SetFocus
Exit Sub
End If
'---------------------------------------------------------------
'Performs the search using value entered into txtSearch
'and evaluates this against values in EMP ID
DoCmd.ShowAllRecords
DoCmd.GoToControl ("EMP ID")
DoCmd.FindRecord Me!txtSearch
[EMP ID].SetFocus
strStaffRef = [EMP ID].Text
txtSearch.SetFocus
strSearch = txtSearch.Text
If strStaffRef = strSearch Then
MsgBox "Match Found For: " & strSearch, , "Congratulations!"
[EMP ID].SetFocus
txtSearch = ""
'If value not found sets focus back to txtSearch and shows msgbox
Else
MsgBox "Match Not Found For: " & strSearch & " - Please Try Again.", , "Invalid Search Criterion!"
txtSearch.SetFocus
End If
End Sub
Last edited: